Skip to content

Commit 55751df

Browse files
committed
removed old comments that were specific to release 0.9.1, changed name of variable that was specific to IWP dataset within clip to footprint step
1 parent bead90d commit 55751df

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

pdgstaging/ConfigManager.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ class ConfigManager():
275275
the intersecting polygons to be considered a duplicate. If
276276
False, then the overlap_tolerance proportion must be True
277277
for only one of the intersecting polygons to be considered
278-
a duplicate. Default is True. Note that with release 0.9.0,
279-
the 'neighbor' method has been not been thoroughly tested
280-
and should not be applied to input data.
278+
a duplicate. Default is True.
281279
- deduplicate_centroid_tolerance : float, optional
282280
For the 'neighbor' deduplication method only. The maximum
283281
distance between the centroids of two polygons to be
@@ -299,8 +297,8 @@ class ConfigManager():
299297
- deduplicate_clip_to_footprint : bool, optional
300298
For the 'footprints' deduplication method only. If True,
301299
then polygons that fall outside the bounds of the
302-
associated footprint will be removed. Default is True for
303-
release version 0.9.0, but will be false for future releases.
300+
associated footprint will be removed. Default is True for this
301+
release, but will be false for future releases.
304302
- deduplicate_clip_method: str, optional
305303
For the 'footprints' deduplication method only, when
306304
deduplicate_clip_to_footprint is True. The method to use to

pdgstaging/Deduplicator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ def deduplicate_by_footprint(
478478
return_intersections : bool, optional
479479
If true, the polygons that represent the intersections between
480480
footprints will be returned. Default is False. Not currently available
481-
in this release 0.9.0. return_intersections is to be integrated again
482-
in future releases.
481+
in this release. return_intersections is to be integrated again
482+
in a future release.
483483
prop_duplicated : str, optional
484484
Defaults to "staging_duplicated". The column name / property to use to
485485
flag duplicates.
@@ -494,7 +494,7 @@ def deduplicate_by_footprint(
494494
`intersections` represents the polygon area where the footprints overlap.
495495
It has not been integrated into the function again since the deduplication
496496
approach changed from returning a dictionary to returning a labeled GDF.
497-
This will be integrated again in releases after 0.9.0.
497+
This will be integrated again in a future release.
498498
"""
499499

500500
logger.info(f"Executing footprint deduplication.")

pdgstaging/TileStager.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ def stage(self, path):
130130

131131
if (gdf is not None) and (len(gdf) > 0):
132132
gdf = self.simplify_geoms(gdf)
133-
# clip to footprint before CRS of IWP data is transformed
134-
# to EPSG:4326
133+
# If clipping to footprint, do so before CRS is transformed
135134
gdf = self.clip_to_footprint(gdf, path)
136135
gdf = self.set_crs(gdf)
137136
self.grid = self.make_tms_grid(gdf)
@@ -177,19 +176,19 @@ def clip_to_footprint(self, gdf, path):
177176
fp = self.get_data(fp_path)
178177
logger.info(f' Checking CRSs of polygons and footprint.')
179178

180-
iwp_crs = gdf.crs
179+
data_crs = gdf.crs
181180
fp_crs = fp.crs
182181

183-
if iwp_crs == fp_crs:
184-
logger.info(f" CRSs match. They are both {iwp_crs}.")
182+
if data_crs == fp_crs:
183+
logger.info(f" CRSs match. They are both {data_crs}.")
185184
else:
186-
logger.info(f" CRSs do not match.\n IWP's CRS is {iwp_crs}."
185+
logger.info(f" CRSs do not match.\n Data's CRS is {data_crs}."
187186
f" Footprint's CRS is {fp_crs}.")
188187
# transform the footprint to the CRS of the polygon data
189-
fp.to_crs(iwp_crs, inplace = True)
188+
fp.to_crs(data_crs, inplace = True)
190189
# check again
191190
fp_crs_transformed = fp.crs
192-
if iwp_crs == fp_crs_transformed:
191+
if data_crs == fp_crs_transformed:
193192
logger.info("Footprint CRS has been transformed to CRS of polygons.")
194193
else:
195194
logger.error("Failed to transform footprint CRS to CRS of polygons.")
@@ -505,8 +504,8 @@ def save_tiles(self, gdf=None):
505504
# no polygons will be labeled as duplicates or not.
506505
# If deduplicating by footprint:
507506
# neither file has been clipped to footprint
508-
logger.info(f"Tile exists but dedup is not set to occur, so just "
509-
f"appending the polygons.")
507+
logger.info(f"Tile exists but dedup is not set to occur, so"
508+
f" appending polygons.")
510509

511510
# Append to existing tile
512511
mode = 'a'

0 commit comments

Comments
 (0)