OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-12-03 19:36:38

Lenni10
Member
Registered: 2018-12-03
Posts: 1

Java: pbf Stream instead of Reader

I'm currently using my own implementation of

org.openstreetmap.osmosis.core.task.v0_6.Sink

in combination with

crosby.binary.osmosis.OsmosisReader

to extract the nodes I want from the latest planet.osm.pbf file.

My application is not time-critical, but as the OsmosisReader reads & processes the file completely first, before invoking the process method on each node, I think my pc will run out of RAM once I switch from one of the smaller files to the actual planet map.

You can inspect my project on GitHub @ https://raw.githubusercontent.com/scrou … eader.java.

Is it possible to use some kind of Pbf Stream instead of the OsmosisReader with which I can process every tag parallely to the decompression of the file?

Thank you in advance :)

Last edited by Lenni10 (2018-12-03 19:59:31)

Offline

#2 2018-12-05 18:43:06

GerdP
Member
Registered: 2015-12-18
Posts: 794

Re: Java: pbf Stream instead of Reader

You may have a look at splitter or mkgmap (1) or the pbf plugin for JOSM. They all use osm-pbf.jar

(1) http://www.mkgmap.org.uk/

Offline

#3 2019-02-11 05:55:44

supriyala
New Member
Registered: 2019-02-11
Posts: 1

Re: Java: pbf Stream instead of Reader

Excellent answer by GerdP. It was very helpful for me. Thank you.
https://crbtech.in/online-java-training-course

Last edited by supriyala (2019-03-07 10:08:58)

Offline

Board footer

Powered by FluxBB