[OSM-dev] Multipolygon decoding

Paul Norman penorman at mac.com
Sun Jan 3 23:42:11 UTC 2016


On 1/3/2016 2:24 PM, Mikoláš Štrajt wrote:
> I am developing my own rendering software and I struggled on decoding 
> multipolygon relations. It seems to be bit tricky. I tried to found 
> some info about it, but all I found is this wiki page: 
> http://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm
>
> Can you point to some example of code decoding multipolygons? I would 
> especially like something that will be written with renderer in mind 
> (ie source code is part of some renderer).
>
> Note that my software decodes OSM XML file itself, I don't want to use 
> PostGIS as backend.

libosmium, osm2pgsql, and imposm all have implementations of converting 
multipolygon relations to geometries.

I would recommend using libosmium in your software if at all possible, 
rather than trying to decode OSM PBFs and XML yourself.



More information about the dev mailing list