Can anyone point me towards a working example of using header_file in OGR to read some remote GeoJSON via /vsicurl? I've not got it to work yet, and haven't found a good example to follow, only the OGR docs (which I might be misreading).
=> More informations about this toot | More toots from tomchadwin@en.osm.town
@tomchadwin
$ echo "foo:bar" > headers.txt
$ ogrinfo --config GDAL_HTTP_HEADER_FILE headers.txt http://example.com/my.geojson
=> More informations about this toot | More toots from EvenRouault@mastodon.social
@EvenRouault Thank you! So it's not:
ogrinfo -ro -al -so /vsicurl?header_file=headers.txt*url=https://example.com/my.geojson
or:
ogrinfo -ro -al -so /vsicurl?[header_file=headers.txt]*url=https://example.com/my.geojson
as per https://gdal.org/en/stable/user/virtual_file_systems.html#vsicurl-http-https-ftp-files-random-access?
=> More informations about this toot | More toots from tomchadwin@en.osm.town
@tomchadwin That's a possible alternative. But the '' in [foo=bar&] just means the options may be repeated 0 or multiple times.
So you want something like:
"/vsicurl?header_file=headers.txt&url=https://example.com/my.geojson"
=> More informations about this toot | More toots from EvenRouault@mastodon.social
@EvenRouault Thanks very much. It's failing - I had better ask a GIS.SE question, then rather than exploit your good will here, Even. Thanks again.
=> More informations about this toot | More toots from tomchadwin@en.osm.town
@EvenRouault Question asked here: https://gis.stackexchange.com/questions/488656/how-to-debug-a-failing-ogr-vsicurl-call
=> More informations about this toot | More toots from tomchadwin@en.osm.town This content has been proxied by September (ba2dc).Proxy Information
text/gemini