Hi Nop, > Nodes that are tagged as parking can be rendered with an icon using a > PointSymbolizer. > > Now if I have a polygon area that is tagged as parking - is there a way > to put a P-icon somewhere in the center of the area?
I am using sql queries to compute points in areas where to put icons. Something along this line should work: "SELECT ST_Centroid(way) AS way FROM planet_osm_polygon WHERE ..." This can of course lead to the point being outside the polyon (for banana shapes). To circumvent this, I am sometimes using the following construct (not well tested, as I did not knowingly encounter such cases yet in my maps): "SELECT CASE WHEN ST_Within(ST_Centroid(way), way) THEN ST_Centroid(way) ELSE ST_PointOnSurface(way) END AS way FROM planet_osm_polygon WHERE ..." I have no experience yet, where on the surface PostGIS places the node and what the performance of this will be for larger maps, though ... (For parking lots, the osm2pgsql preprocessing described by Jon seems to work well for me, as well.) Yours, -- Holger Schoener [email protected] _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

