tyrasd / osmtogeojson

convert osm to geojson
http://tyrasd.github.io/osmtogeojson/
MIT License
686 stars 112 forks source link

osmtogeojson typically needs about 4-5 times the input data size #59

Closed suze521 closed 7 years ago

suze521 commented 7 years ago

my osm file size is lager than 40G, so i need memory 200G ? is there any way to reduce the memory?

tyrasd commented 7 years ago

Hi! osmtogeojson is optimized for speed and flexibility of use (e.g. in a browser environment). This comes at the cost of having to keep the whole dataset in memory (including the mentioned 3-4x overhead for things like dynamic indices and an output buffer).

If you need to process the whole OSM planet (or a large country), osmtogeojson is not the right tool for the job. There are better alternatives for this use case, for example https://github.com/mapbox/minjur (written in C++).