<div dir='auto'><div>Hi Ilya,</div><div dir="auto"><br></div><div dir="auto">Thank you very much for your answer. Libosmium seems just the library I was searching for. Mabox QA tiles are interesting too but according to their docs they do not include relations but I need multi-polygons. http://osmlab.github.io/osm-qa-tiles/</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Christoph</div><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Am 12.05.2017 7:28 nachm. schrieb Ilya Zverev <ilya@zverev.info>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">The answer hugely depends on your task. There is no such preprocessed geojson planet dump, because it would be huge and a pain to use.
<br>

<br>
Most people use libosmium or pyosmium to scan through the features in an OSM file. You will get geometries and even reconstructed multipolygons. See http://osmcode.org/
<br>

<br>
Then there are QA Tiles, a whole planet split into small tiles in the MVT format. People use them to build validation and QA services, like counting buildings and finding geometry errors. Links and a few examples are here: https://www.mapbox.com/blog/osm-qa-tiles/
<br>

<br>
To get billions of GeoJSON objects for every feature in the planet, you can use osm2pgsql to import the planet dump into a PostgreSQL+PostGIS database. It will make three tables for points, lines and polygons. After that, pgsql can give you geometries and tags in geojson format: you would have to make three queries and assemble the result into one big geojson file. Or process these on the spot. The drawback is that you would need half a terabyte for that.
<br>

<br>
Ilya
<br>

<br>
> 12 мая 2017 г., в 19:18, Christoph Lingg <christoph@lingg.eu> написал(а):
<br>

<br>
> Hello,
<br>

<br>
> when it comes to read raw OSM dumps it's quite straightforward to parse nodes: their geometry properties can be read alongside with their tags. When it comes to linestrings and relations it is more complicated to access their geometry: the geometry of referenced nodes needs to be combined into lines and polygons. Also one needs to decide which linestrings/relations are actually lines and which are areas.
<br>

<br>
> I know how this can be done but I am wondering if there are preprocessed datasets around that have geometries already precomputed. That would make sense to me as a lot of people face the sample problem and this step is quite resource intense.
<br>

<br>
> A huge file containing all osm items as geojson would be my dreamcase. Does this exist?
<br>

<br>
> Thank you for your time and your help!
<br>
> Christoph Lingg
<br>
> _______________________________________________
<br>
> dev mailing list
<br>
> dev@openstreetmap.org
<br>
> https://lists.openstreetmap.org/listinfo/dev
<br>
</p>
</blockquote></div><br></div></div></div>