From 92566c324dd245737862be52fda2ea775f02bdf3 Mon Sep 17 00:00:00 2001 From: Komzpa Date: Fri, 23 Mar 2012 14:06:26 +0300 Subject: [PATCH] drop short lines when rendering --- src/komap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/komap.py b/src/komap.py index 590adbd..ac773dc 100644 --- a/src/komap.py +++ b/src/komap.py @@ -811,8 +811,9 @@ if options.renderer == "mapnik": #itags = "\""+ itags+"\"" sqlz = """select * from (select %s, ST_Simplify(ST_LineMerge(ST_Union(way)),%s) as way from (SELECT * from %sline where way && ST_Expand(!bbox!,%s) and (%s) and (%s)) as tex group by %s) p + where ST_Length(p.way) > %s %s ST_Length(p.way) desc - """%(itags,pixel_size_at_zoom(zoom,4),libkomapnik.table_prefix,max(pixel_size_at_zoom(zoom,20),3000),ttext,sqlz,goitags,order) + """%(itags,pixel_size_at_zoom(zoom,4),libkomapnik.table_prefix,max(pixel_size_at_zoom(zoom,20),3000),ttext,sqlz,goitags,pixel_size_at_zoom(zoom,4),order) mfile.write(xml_layer("postgis-process", layer_type, itags, sqlz, zoom=zoom ))