better polygon label handling

This commit is contained in:
Komzpa 2011-11-06 18:15:46 +02:00
parent 5bd257bcca
commit 90037818a3

View file

@ -722,8 +722,8 @@ if options.renderer == "mapnik":
ST_Translate(
ST_Rotate(
ST_GeomFromEWKT('SRID=900913;LINESTRING(-50 0, 50 0)'),
-1*ST_Azimuth(ST_PointN(ST_ShortestLine(l.way, ST_PointOnSurface(h.way)),1),
ST_PointN(ST_ShortestLine(l.way, ST_PointOnSurface(h.way)),2)
-1*ST_Azimuth(ST_PointN(ST_ShortestLine(ST_Centroid(l.way), ST_PointOnSurface(h.way)),1),
ST_PointN(ST_ShortestLine(ST_Centroid(l.way), ST_PointOnSurface(h.way)),2)
)
),
ST_X(ST_PointOnSurface(ST_Buffer(h.way,0.1))),