On 28-5-2010 15:47, numenor wrote:

stream of invalid geometry warnings from geos and a hefty slowdown in
rendering while this is going on.

Do you know under which circumstances this may happen?

It happens in the output of renderd, so it may not happen for you when using other tools or scripts to renderd.

I am using this construct with OSM data:
     CASE WHEN ST_Within(ST_Centroid(way), way) THEN ST_Centroid(way) ELSE
ST_PointOnSurface(way) END AS way

Mapnik is already doing the equivalent of ST_Centroid when presented with a polygon for a TextSymbolizer with point placement.

I used this before, and the warnings I mention are coming from ST_IsValid:

CASE WHEN ST_Valid(way) THEN ST_PointOnSurface(way) ELSE way END AS way

On the presumption that ST_PointOnSurface gives the same results as ST_Centroid (or mapnik's default placement) for a non-concave polygon.

data using osm2pgsql I usually perform some database cleanup before actual
rendering, which is supposed to fix invalid geometries. But thanks for the
note anyway, I was not aware of that.

Fixing those invalid geometries in OSM might be even more interesting. Then again, certain invalid OGC geometries are actually valid OSM geometries. Multipolygons with touching inner rings, for instance.

--
Lennard
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to