945 |
|
|
946 |
if shapetype == SHAPETYPE_POLYGON: |
if shapetype == SHAPETYPE_POLYGON: |
947 |
for i in shape_ids: |
for i in shape_ids: |
948 |
result = point_in_polygon_shape(layer.shapefile.cobject(), |
shapefile = layer.ShapeStore().Shapefile().cobject() |
949 |
i, |
result = point_in_polygon_shape(shapefile, i, |
950 |
filled, stroked, |
filled, stroked, |
951 |
map_proj, layer_proj, |
map_proj, layer_proj, |
952 |
scale, -scale, offx, offy, |
scale, -scale, offx, offy, |
956 |
break |
break |
957 |
elif shapetype == SHAPETYPE_ARC: |
elif shapetype == SHAPETYPE_ARC: |
958 |
for i in shape_ids: |
for i in shape_ids: |
959 |
result = point_in_polygon_shape(layer.shapefile.cobject(), |
shapefile = layer.ShapeStore().Shapefile().cobject() |
960 |
|
result = point_in_polygon_shape(shapefile, |
961 |
i, 0, 1, |
i, 0, 1, |
962 |
map_proj, layer_proj, |
map_proj, layer_proj, |
963 |
scale, -scale, offx, offy, |
scale, -scale, offx, offy, |
1019 |
# a label was selected |
# a label was selected |
1020 |
label_layer.RemoveLabel(shape_index) |
label_layer.RemoveLabel(shape_index) |
1021 |
elif layer is not None: |
elif layer is not None: |
1022 |
text = labeldialog.run_label_dialog(self, layer.table, shape_index) |
text = labeldialog.run_label_dialog(self, |
1023 |
|
layer.ShapeStore().Table(), |
1024 |
|
shape_index) |
1025 |
if text: |
if text: |
1026 |
proj = self.map.projection |
proj = self.map.projection |
1027 |
if proj is not None: |
if proj is not None: |
1036 |
|
|
1037 |
shapetype = layer.ShapeType() |
shapetype = layer.ShapeType() |
1038 |
if shapetype == SHAPETYPE_POLYGON: |
if shapetype == SHAPETYPE_POLYGON: |
1039 |
x, y = shape_centroid(layer.shapefile.cobject(), |
shapefile = layer.ShapeStore().Shapefile().cobject() |
1040 |
shape_index, |
x, y = shape_centroid(shapefile, shape_index, |
1041 |
map_proj, layer_proj, 1, 1, 0, 0) |
map_proj, layer_proj, 1, 1, 0, 0) |
1042 |
if map_proj is not None: |
if map_proj is not None: |
1043 |
x, y = map_proj.Inverse(x, y) |
x, y = map_proj.Inverse(x, y) |