Add description & Clean
This commit is contained in:
parent
e7cd466038
commit
212f472716
|
@ -1,7 +1,11 @@
|
||||||
"""
|
"""
|
||||||
handle_varennes_ds_workflow module
|
remove_nrcan_duplicates_bbox module
|
||||||
NRCan datalayer has two polygons for each buildings' footprint.
|
NRCan datalayer has two polygons for each buildings' footprint.
|
||||||
The below workflow has been designed to remove the extra polygons.
|
The below workflow has been designed to remove the extra polygons.
|
||||||
|
Enhancements to the remove_nrcan_duplicates_bbox Module:
|
||||||
|
In remove_nrcan_duplicates_bbox, four more features have been used
|
||||||
|
to compare each two polygons for removing one. These features come
|
||||||
|
from the bounding box data and make the process more accurate.
|
||||||
Project Developer: Alireza Adli alireza.adli@concordia.ca
|
Project Developer: Alireza Adli alireza.adli@concordia.ca
|
||||||
"""
|
"""
|
||||||
# You need to clone mtl_gis_oo project and
|
# You need to clone mtl_gis_oo project and
|
||||||
|
@ -101,7 +105,6 @@ varennes_nrcan_centroids_df['ID'] = range(len(varennes_nrcan_centroids_df))
|
||||||
# between centroid_x of polygons and centroid_y of the polygons
|
# between centroid_x of polygons and centroid_y of the polygons
|
||||||
# The tolerance can be changed to one or five
|
# The tolerance can be changed to one or five
|
||||||
tolerance = 7
|
tolerance = 7
|
||||||
counter = 0
|
|
||||||
centroid_x = varennes_nrcan_centroids_df['centroid_x'].tolist()
|
centroid_x = varennes_nrcan_centroids_df['centroid_x'].tolist()
|
||||||
centroid_y = varennes_nrcan_centroids_df['centroid_y'].tolist()
|
centroid_y = varennes_nrcan_centroids_df['centroid_y'].tolist()
|
||||||
min_x = varennes_nrcan_centroids_df['min_x'].tolist()
|
min_x = varennes_nrcan_centroids_df['min_x'].tolist()
|
||||||
|
@ -116,6 +119,7 @@ for feature_index in range(len(centroid_x)):
|
||||||
a_x = centroid_x[feature_index]
|
a_x = centroid_x[feature_index]
|
||||||
b_x = centroid_x[next_feature_index]
|
b_x = centroid_x[next_feature_index]
|
||||||
subtract_centroid_x = a_x - b_x
|
subtract_centroid_x = a_x - b_x
|
||||||
|
|
||||||
a_y = centroid_y[feature_index]
|
a_y = centroid_y[feature_index]
|
||||||
b_y = centroid_y[next_feature_index]
|
b_y = centroid_y[next_feature_index]
|
||||||
subtract_centroid_y = a_y - b_y
|
subtract_centroid_y = a_y - b_y
|
||||||
|
@ -123,6 +127,7 @@ for feature_index in range(len(centroid_x)):
|
||||||
a_min_x = min_x[feature_index]
|
a_min_x = min_x[feature_index]
|
||||||
b_min_x = min_x[next_feature_index]
|
b_min_x = min_x[next_feature_index]
|
||||||
subtract_min_x = a_min_x - b_min_x
|
subtract_min_x = a_min_x - b_min_x
|
||||||
|
|
||||||
a_min_y = min_y[feature_index]
|
a_min_y = min_y[feature_index]
|
||||||
b_min_y = min_y[next_feature_index]
|
b_min_y = min_y[next_feature_index]
|
||||||
subtract_min_y = a_min_y - b_min_y
|
subtract_min_y = a_min_y - b_min_y
|
||||||
|
@ -130,6 +135,7 @@ for feature_index in range(len(centroid_x)):
|
||||||
a_max_x = max_x[feature_index]
|
a_max_x = max_x[feature_index]
|
||||||
b_max_x = max_x[next_feature_index]
|
b_max_x = max_x[next_feature_index]
|
||||||
subtract_max_x = a_max_x - b_max_x
|
subtract_max_x = a_max_x - b_max_x
|
||||||
|
|
||||||
a_max_y = max_y[feature_index]
|
a_max_y = max_y[feature_index]
|
||||||
b_max_y = max_y[next_feature_index]
|
b_max_y = max_y[next_feature_index]
|
||||||
subtract_max_y = a_max_y - b_max_y
|
subtract_max_y = a_max_y - b_max_y
|
||||||
|
|
Loading…
Reference in New Issue
Block a user