Skip to content

Commit

Permalink
fix for validate tool attempting to check topology on feature classes…
Browse files Browse the repository at this point in the history
… in CMU feature dataset
  • Loading branch information
ethoms-usgs committed Oct 18, 2023
1 parent 21f909e commit b3be58b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Scripts/GeMS_ValidateDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@
from osgeo import ogr

# for debugging
from importlib import reload
# from importlib import reload

# reload(guf)
# reload(tp)
reload(gdef)
# reload(gdef)

# values dictionary gets sent to report_template.jinja errors_template.jinja
val = {}

version_string = "GeMS_ValidateDatabase.py, version of 9/28/2023"
version_string = "GeMS_ValidateDatabase.py, version of 10/18/2023"
val["version_string"] = version_string
val["datetime"] = time.asctime(time.localtime(time.time()))

Expand Down Expand Up @@ -215,11 +215,14 @@ def rule2_1(db_dict, is_gpkg):
k
for k, v in db_dict.items()
if v["gems_equivalent"] in gdef.required_geologic_map_feature_classes
and not "crosssection" in v["feature_dataset"].lower()
and not "cmu" in v["feature_dataset"].lower()
and not any(
n in v["feature_dataset"].lower()
for n in ("correlationofmapunits", "cmu", "crosssection")
)
]
# find_topology_pairs returns [GeologicMap feature dataset(if gdb), fd_tag_name, mapunitpolys, contactsandfaults]
possible_pairs = tp.find_topology_pairs(fcs, is_gpkg, db_dict)
print(possible_pairs)
if possible_pairs:
# check each tagged name pair in the case of no feature dataset (pair[0])
for pair in possible_pairs:
Expand Down
1 change: 1 addition & 0 deletions Scripts/GeMS_utilityFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def gdb_object_dict(gdb_path):
if (
any(n in k.lower() for n in (a.lower(), camel_to_snake(a)))
and gdef.shape_dict[a] in v["concat_type"]
and not "cmu" in a.lower()
):
# set the gems_equivalent key to the GeMS CamelCase name
v["gems_equivalent"] = a
Expand Down

0 comments on commit b3be58b

Please sign in to comment.