[OSM-dev] Selectively processing relations in osm2pgsql

andrzej zaborowski balrogg at gmail.com
Thu Jan 19 22:07:27 GMT 2012


for a couple of weeks I'm running osm2pgsql on osm.trail.pl with a
change to not build geometries for relations that are not rendered.
At a guess it speeds updates up by 20-30% in our case.  In the hourly
diffs road relations make up about half of the touched relations and
take most of the relations processing time.  Without this change
relations seemed to take perhaps half of the osm2pgsql running time.

Unfortunately the style file doesn't have a way to indicate which
relations are important and which aren't.  What would be a good format
for that?

I have hardcoded the relation types to allow multipolygons, boundaries
and certain types of routes which we render, (diff at
http://dpaste.com/690404/) but other will want road relations and will
want to drop multipolygons for example.


More information about the dev mailing list