[OSM-talk] Compression on Overpass API

Dave F davefoxfac63 at btinternet.com
Sun Nov 6 11:54:18 UTC 2016


Thanks. A useful option to know.

There's also -H "Accept-encoding: gzip". If you specify the output file 
as *.gz it keeps the data compressed. I use it to convert the data to 
garmin GPS format using mkgmap.

Do you have a link to the weeklyOSM article?

DaveF

On 01/11/2016 21:30, Adrian wrote:
> I read in a recent weeklyOSM about prototype software for downloading OSM data in PBF format from Overpass. This has prompted me to pass on a tip which may not be widely known: It is possible to obtain about 10:1 compression now on any OAPI or XAPI query by using HTTP compression. This is supported on the German and French instances but not on the Russian instance. I use 'curl --compressed' at the command line to invoke HTTP compression, e.g. (for an area of central London)
> XAPI query
> curl --compressed -g -o data.osm https://overpass-api.de/api/xapi_meta?*[bbox=-0.15,51.49,-0.1,51.52]
> Equivalent OAPI query
> curl --compressed -g -o data.osm 'https://overpass-api.de/api/interpreter?data=(node(51.49,-0.15,51.52,-0.1);%20<;node(w););out%20meta;'
> This can greatly speed up the downloading of large datasets.
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk




More information about the talk mailing list