Hi there,
I was hoping to get some guidance on where I need to look/read or what other
options I could use to extract a JSON from a GDB.
Here's the issue:
For some reason, when I unzip an archive that has a GDB, `ogrinfo` doesn't
produce the JSON with metadata (what columns, types, layers and spatial columns
it has). When I run ogrinfo I get: ogrinfo: ./json_object.c:640:
json_object_object_del: Assertion `json_object_get_type(jso) ==
json_type_object' failed.
Here's what I've done:
"manually" unzip and open [1,2] with QGIS and try ogrinfo-> Doesn't work
Use Python to unzip and open with QGIS and try ogrinfo -> Doesn't work
Use the zipped file and open with QGIS -> Works
Use a similar data set [5], unzip and open with QGIS (works) then run ogrinfo
on it (doesn't work, same error)
Open with Fiona, works (but I would prefer to stick with ogrinfo)
More details:
I thought it could be an ogrinfo version thing so I tried a different data set
[3, 4] (NYS tax parcel data) and it worked as expected (I'm able to get a JSON).
When I tried to open the unzipped file with QGIS I get: Invalid Data Source:
SAM_Master_Statewide_Database.gdb is not a valid or recognized data source. .
When I use ogrinfo against it, it mostly works:
$ ogrinfo ../Data/SAM-Address/SAM_Master_Statewide_Database.gdb -so
INFO: Open of `../Data/SAM-Address/SAM_Master_Statewide_Database.gdb'
using driver `OpenFileGDB' successful.
Layer: AddressPoints_SAM (Point)
But when I try to get a JSON from it (the issue):
$ ogrinfo ../Data/SAM-Address/SAM_Master_Statewide_Database.gdb -so -json
ogrinfo: ./json_object.c:640: json_object_object_del: Assertion
`json_object_get_type(jso) == json_type_object' failed.
[1] 240230 IOT instruction (core dumped) ogrinfo
../Data/SAM-Address/SAM_Master_Statewide_Database.gdb -so -json
Version stuff:
I'm on WSL:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.2 LTS"
...
$ ogrinfo --version
GDAL 3.8.4, released 2024/02/08
I have to stick to 24.04 so I can't install the latest gdal
Does anyone have thoughts on how I should proceed? What could I try? I went
through the manual but nothing really pops, perhaps using the summary but
without -json is an option but that just adds more code paths to my project.
I would be happy to contribute but I don't know where to look nor how to make a
smaller test to reproduce the issue. Any pointers are appreciated.
Thank you for your time!
Best,
EJ
[1] https://gis.ny.gov/streets-addresses
[2]
https://gisdata.ny.gov/GISData/State/Address_Points/SAM_Master_Statewide_Database.gdb.zip
[3] https://gis.ny.gov/parcels
[4] https://gisdata.ny.gov/GISData/State/Parcels/NYS-Tax-Parcels.zip
[5] https://data.gis.ny.gov/datasets/dfa176b4cf284539812c05478dc028d2/about
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev