Hi Horst,

numenor schrieb:
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

isn't that shlow than actually calculating ST_PointOnSurface(way)?

(so actually this might be the reason, why the labels usually appear in
the middle of the shape ...) since about a year, without consciously
noticing the problems you describe. On the other hand, after importing the
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.

I've created a trigger, which checks ST_IsValid after importing or
updating. It then creates a new column "IsValid" with TRUE or FALSE
inside. Okay, that's only useful if you want to do more than rendering.

PostGIS v1.3 or GEOS crashes on invalid geometries . I think, this was
fixed on a later version.

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

Reply via email to