Re: [gdal-dev] Bug/feature: OGR VSICURL does not handle gzip compression

2022-11-11 Thread Stefan Gofferje

Hi,

On 11/11/22 04:59, Thomas Gratier wrote:
Use the CURL option available through GDAL e.g 
https://trac.osgeo.org/gdal/wiki/ConfigOptions#CPL_CURL_GZIP 
 (also 
documented at https://gdal.org/user/configoptions.html 
)


To illustrate, try the following

ogrinfo -so --config CPL_CURL_GZIP YES 
"https://tie.digitraffic.fi/api/v3/data/traffic-messages/simple?inactiveHours=0=false=TRAFFIC_ANNOUNCEMENT " OGRGeoJSON


That works from the command line but I haven't found a way to pass 
options when using VSICURL in mapserver or QGIS.


-Stefan

--
 (o_   Stefan Gofferje| SCLT, MCP, CCSA
 //\   Reg'd Linux User #247167   | VCP #2263
 V_/_  https://www.gofferje.net   | https://www.saakeskus.fi

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Bug/feature: OGR VSICURL does not handle gzip compression

2022-11-10 Thread Thomas Gratier
Hi,

Use the CURL option available through GDAL e.g
https://trac.osgeo.org/gdal/wiki/ConfigOptions#CPL_CURL_GZIP (also
documented at https://gdal.org/user/configoptions.html)

To illustrate, try the following

ogrinfo -so --config CPL_CURL_GZIP YES "
https://tie.digitraffic.fi/api/v3/data/traffic-messages/simple?inactiveHours=0=false=TRAFFIC_ANNOUNCEMENT;
OGRGeoJSON


Regards

Thomas Gratier
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Bug/feature: OGR VSICURL does not handle gzip compression

2022-11-10 Thread Stefan Gofferje
Hi,

I'm trying to import traffic situation data in GeoJSON format from the Finnish 
Road Administration at

https://tie.digitraffic.fi/api/v3/data/traffic-messages/simple?
inactiveHours=0=false=TRAFFIC_ANNOUNCEMENT

Unfortunately, the server is configured so that it only accepts requests with 
"Accept-encoding: gzip" set - which vsicurl can't/won't handle. It would 
probably generally be useful if vsicurl would offer gzip encoding because most 
servers can handle it and it does save quite a bit of traffic on text-based 
data like GeoJSON.

BR: Stefan

-- 
 (o_   Stefan Gofferje| SCLT, MCP, CCSA
 //\   Reg'd Linux User #247167   | VCP #2263
 V_/_  https://www.gofferje.net   | https://www.saakeskus.fi 



___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev