Am 11.09.2010 08:26, schrieb Jukka Rahkonen:
Pretty easy and in theory it works immediately after osm2pgsql import without any other preprocessing. However, I did not put it into mapfile because rendering fails after ST_PointOnSurface failing first with some polygons: NOTICE: TopologyException: found non-noded intersection between LINESTRING (8569.5 4234.62, 8623.96 4373.11) and LINESTRING (8637.48 4400.77, 8610.45 4345.45)at 8623.96 4373.1
Yes, that's a known problem (or feature?). OSM allows invalid geometries for polygons and mapnik can render them, but some postgis functions will fail. It is possible to use ST_IsValid but this adds a medium runtime penalty.
To come around this we could add an isvalid coumn to the polygon table. This column can be filled via a trigger or via osm2pgsql. This would move the penalty to the import.
Peter _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

