Skip to content

Commit 24a56f3

Browse files
committed
pip concatenated datasources ok
1 parent 0ccb5db commit 24a56f3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Scripts/GeMS_ValidateDatabase_Arc10.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
# Added reminder to document any schema extensions
2525
# Added feature dataset SRF names to database inventory - RH
2626
# 8 March 2021: Added D_North_American_1983 to list of datums that don't generate a warning
27+
# 1/27/22: added clause to parse DataSourceIDs that might take the form of 'DAS1 | DAS2 | DAS3', etc. That is, allows for multiple datasources
28+
# to be related to a table row. in def ScanTable under 'for i in dataSourceIndices:'
2729

2830
import arcpy, os, os.path, sys, time, glob
2931
import traceback
3032
from GeMS_utilityFunctions import *
3133
from GeMS_Definition import *
3234
import copy
3335

34-
versionString = 'GeMS_ValidateDatabase_Arc10.py, version of 5 May 2021'
36+
versionString = 'GeMS_ValidateDatabase_Arc10.py, version of 27 January 2022'
3537
rawurl = 'https://raw.githubusercontent.com/usgs/gems-tools-arcmap/master/Scripts/GeMS_ValidateDatabase_Arc10.py'
3638
checkVersion(versionString, rawurl, 'gems-tools-arcmap')
3739

@@ -751,9 +753,11 @@ def scanTable(table, fds=''):
751753
for i in dataSourceIndices:
752754
xx = row[i]
753755
if notEmpty(xx):
754-
xxft = [fixSpecialChars(xx),fieldNames[i],table] #$@
755-
if not xx in allDataSourcesRefs:
756-
allDataSourcesRefs.append(xxft)
756+
ids = [e.strip() for e in xx.split('|') if e.strip()]
757+
for xxref in ids:
758+
xxft = [xxref, fieldNames[i], table]
759+
if not xxref in allDataSourcesRefs:
760+
allDataSourcesRefs.append(xxft)
757761
if mapUnitFieldIndex <> [] and row[mapUnitFieldIndex[0]] <> None:
758762
for i in specialDmuFieldIndices:
759763
xx = row[i]

0 commit comments

Comments
 (0)