Skip to content

Commit

Permalink
possible fix for bounding box calculation on unknown CSR's
Browse files Browse the repository at this point in the history
  • Loading branch information
ethoms-usgs committed Feb 27, 2024
1 parent e11deb5 commit c422e87
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Scripts/GeMS_FGDCMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ def max_bounding(db_path):
for layer in ogr.Open(db_path):
# if layer.GetGeomType() != 100:
if "MapUnitPolys" in layer.GetName() or "ContactsAndFaults" in layer.GetName():
bounding = su.get_bounding(str(db_path), layer.GetName())
north.append(bounding.find("northbc").text)
south.append(bounding.find("southbc").text)
west.append(bounding.find("westbc").text)
east.append(bounding.find("eastbc").text)
if layer.GetSpatialRef():
bounding = su.get_bounding(str(db_path), layer.GetName())
north.append(bounding.find("northbc").text)
south.append(bounding.find("southbc").text)
west.append(bounding.find("westbc").text)
east.append(bounding.find("eastbc").text)

bounding.find("northbc").text = max(north)
bounding.find("southbc").text = min(south)
Expand Down

0 comments on commit c422e87

Please sign in to comment.