I'm trying to move from downloading geodata manually and then working with it using ogr2ogr on the local file to just reading the data in from the url directly in order to have the actual source in the code and save myself some work.
For example I'd like to grab this county boundary from the url: https://opendata.arcgis.com/datasets/4286963f248b46829ed860f4743eb85e_0.zip
this command works for me:
# ogrinfo a shapefile in a zip file on the internet:
ogrinfo -ro -al -so /vsizip//vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/poly.zip
but when i change it to point at the county boundary it is unable to open the source.
ogrinfo /vsizip//vsicurl/https://opendata.arcgis.com/datasets/4286963f248b46829ed860f4743eb85e_0.zip
Do I need to supply a layer name within the zip folder?
--debug onto the request you will get a bunch of GDAL errorsVSICURL: HEAD did not provide file size. Retrying with GET VSICURL: GetFileSize(https://opendata.arcgis.com/datasets/4286963f248b46829ed860f4743eb85e_0.zip)=0 response_code=200 VSICURL: Request at offset 0, after end of file VSICURL: Request at offset 0, after end of file. I can't say what they mean. – user30184 Apr 02 '20 at 15:52