From ac825fb4cf5cd45a1752a845794bc5bbfecdaf80 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Fri, 20 Jul 2012 00:14:21 +0300 Subject: [PATCH] geometry simplification for nice overdetailed lines rendering --- src/libkomapnik.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libkomapnik.py b/src/libkomapnik.py index e1fdc01..b2cec59 100644 --- a/src/libkomapnik.py +++ b/src/libkomapnik.py @@ -329,13 +329,12 @@ def xml_layer(type="postgis", geom="point", interesting_tags = "*", sql = "true" else: interesting_tags = ", ".join(interesting_tags) - return """ %s - (select %s, way + (select %s, ST_Simplify(way, %s) from %s%s where %s ) as text @@ -351,7 +350,7 @@ def xml_layer(type="postgis", geom="point", interesting_tags = "*", sql = "true" false -20037508.342789244, -20037508.342780735, 20037508.342789244, 20037508.342780709 - """%(layer_id, db_proj, subs, interesting_tags, table_prefix, geom, sql, intersection_SQL, db_user, db_name, db_srid, table_prefix, geom) + """%(layer_id, db_proj, subs, interesting_tags, 0.6*pixel_size_at_zoom(zoom), table_prefix, geom, sql, intersection_SQL, db_user, db_name, db_srid, table_prefix, geom) elif type == "postgis-process": return """