From c227987e2b38b7652fb02d732b924de58401b037 Mon Sep 17 00:00:00 2001 From: Komzpa Date: Tue, 31 Jan 2012 15:39:11 +0300 Subject: [PATCH] mapnik2 interior placements --- src/komap.py | 4 ++-- src/libkomapnik.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komap.py b/src/komap.py index 89a0fed..12d9b82 100644 --- a/src/komap.py +++ b/src/komap.py @@ -844,12 +844,12 @@ if options.renderer == "mapnik": else: order += ", " if zoom >= 11 or zoom < 6: - sqlz = """select %s, ST_PointOnSurface(ST_Buffer(way,0)) as way + sqlz = """select %s, way) as way from planet_osm_%s where (%s) and (%s) and (way_area > %s) and way && ST_Expand(!bbox!,3000) %s way_area desc """%(itags,layer_type,ttext,sqlz,pixel_size_at_zoom(zoom,3)**2, order) else: - sqlz = """select %s, ST_PointOnSurface(ST_Buffer(way,0)) as way + sqlz = """select %s, way from ( select (ST_Dump(ST_Multi(ST_Buffer(ST_Collect(p.way),0)))).geom as way, %s from ( diff --git a/src/libkomapnik.py b/src/libkomapnik.py index 10264be..63931c4 100644 --- a/src/libkomapnik.py +++ b/src/libkomapnik.py @@ -135,7 +135,7 @@ def xml_textsymbolizer( size = size.split(",")[0] - placement = {"center": "point"}.get(placement.lower(), placement) + placement = {"center": "interior"}.get(placement.lower(), placement) align = {"center": "middle"}.get(align.lower(), align) dy = int(float(offset)) dx = 0 @@ -144,7 +144,7 @@ def xml_textsymbolizer( dy = 0 return """ - + """%(text,face,int(float(size)),color,halo_color,halo_radius,placement,dx,dy,overlap,wrap_width,distance,align,opacity,pos, transform) def xml_shieldsymbolizer(path="", width="", height="",