[osmosis-dev] Reading file over http

Brett Henderson brett at bretth.com
Mon Jun 20 00:05:21 UTC 2016


On Mon, 20 Jun 2016 at 02:49 Frederik Ramm <frederik at remote.org> wrote:

> Hi,
>
> On 06/19/2016 04:16 PM, Stephen Knox wrote:
> > This might be a bit of a dumb question, but is it possible already (or
> > would it be possible with minor modification) to read a remote osm xml
> > file over http and stream it, so that the file does not have to be fully
> > downloaded?
>
> wget -O- http://somewhere/file.osm.bz2 | bzcat | osmosis --read-xml -
> --do-something-else
>
> Sadly the more efficient .osm.pbf files cannot be consumed in streaming
> fashion due to Osmosis attempting to seek in the file.
>

Actually, I think it can.

Try this:
wget -O - http://somewhere/file.pbf | osmosis --read-pbf-fast /dev/stdin
--do-something-else

I possibly should make the --read-pbf-fast task the default pbf reading
task.  I don't think it has any downsides.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20160620/4824b38d/attachment.html>


More information about the osmosis-dev mailing list