bcgov / FIT_changedetector

Compare two sets of geodata, reporting on various types of differences
Apache License 2.0
2 stars 0 forks source link

Layer 'RCL_NoZeroGID_2020.shp' could not be opened #28

Closed andershopperstead closed 3 hours ago

andershopperstead commented 8 hours ago

When using the test files in Q:\dss_workarea_contractors\sinorris\FIT_changedetector\tests\test_2024_11_29_Nanaimo we got the following error:

tart Time: November 29, 2024 1:43:13 PM 2024-11-29 13:43:13,734 - root - INFO - Original data: W:\ilmb\dss\dss_workarea_contractors\sinorris\FIT_changedetector\tests\test_2024_11_29_Nanaimo\RCL_NoZeroGID_2020.shp 2024-11-29 13:43:13,735 - root - INFO - New data: W:\ilmb\dss\dss_workarea_contractors\sinorris\FIT_changedetector\tests\test_2024_11_29_Nanaimo\RCL_NoZeroGID_2024.shp 2024-11-29 13:43:13,736 - root - INFO - Output file: W:\ilmb\dss\dss_workarea_contractors\sinorris\FIT_changedetector\tests\test_2024_11_29_Nanaimo\changedetector_20241129_1343.gdb Layer 'RCL_NoZeroGID_2020.shp' could not be opened Failed script changedetector... Failed to execute (changedetector). Failed at November 29, 2024 1:43:13 PM (Elapsed Time: 0.23 seconds)

andershopperstead commented 6 hours ago

The primary key is GID

smnorris commented 5 hours ago

Looks like this is an issue in arcgis.py, the CLI works as expected:

$ changedetector compare RCL_NoZeroGID_2020.shp RCL_NoZeroGID_2024.shp -pk GID -vv
2024-11-29 16:35:40,630:ERROR:fit_changedetector.cli: Duplicate values exist for primary_key GID, in dataframe a, consider using another primary key or pre-processing to remove duplicates
smnorris commented 5 hours ago

Yes, the arcgis script tool just supports .gdb at the moment. Easy fix, hopefully.