From f8609c2d611bf0addbd0f8901aed4088fdd6e2f4 Mon Sep 17 00:00:00 2001 From: Komzpa Date: Fri, 22 Jul 2011 17:05:37 +0300 Subject: [PATCH] commented back postgis joining of ways with dashes --- src/komap.py | 30 +++++++++++++++--------------- src/styles/osmosnimki-maps.mapcss | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/komap.py b/src/komap.py index b2a1beb..54968c5 100644 --- a/src/komap.py +++ b/src/komap.py @@ -383,21 +383,21 @@ if options.renderer == "mapnik": oitags = itags itags = add_numerics_to_itags(itags) - ### FIXME: Performance degrades painfully on large lines ST_Union. Gotta find workaround :( - if layer_type == "polygon" and there_are_dashed_lines: - itags = ", ".join(itags) - oitags = '"'+ "\", \"".join(oitags) +'"' - sqlz = """select %s, ST_LineMerge(ST_Union(way)) as way from - (SELECT %s, ST_Boundary(way) as way from planet_osm_polygon where (%s) and way && !bbox! and ST_IsValid(way) ) tex - group by %s - """%(itags,oitags,sql,oitags) - #elif layer_type == "line" and there_are_dashed_lines: - # sqlz = """select %s, ST_Union(way) as way from (SELECT * from planet_osm_line where way && !bbox! #and (%s)) as tex - # group by %s - # """%(itags,sql,oitags) - mfile.write(xml_layer("postgis-process", layer_type, itags, sqlz )) - else: - mfile.write(xml_layer("postgis", layer_type, itags, sql )) + #### FIXME: Performance degrades painfully on large lines ST_Union. Gotta find workaround :( + #if layer_type == "polygon" and there_are_dashed_lines: + #itags = ", ".join(itags) + #oitags = '"'+ "\", \"".join(oitags) +'"' + #sqlz = """select %s, ST_LineMerge(ST_Union(way)) as way from + #(SELECT %s, ST_Boundary(way) as way from planet_osm_polygon where (%s) and way && !bbox! and ST_IsValid(way) ) tex + #group by %s + #"""%(itags,oitags,sql,oitags) + ##elif layer_type == "line" and there_are_dashed_lines: + ## sqlz = """select %s, ST_Union(way) as way from (SELECT * from planet_osm_line where way && !bbox! #and (%s)) as tex + ## group by %s + ## """%(itags,sql,oitags) + #mfile.write(xml_layer("postgis-process", layer_type, itags, sqlz )) + #else: + mfile.write(xml_layer("postgis", layer_type, itags, sql )) else: xml_nolayer() for layer_type, entry_types in [("point", ("node", "point")),("line",("way", "line")), ("polygon",("way","area"))]: diff --git a/src/styles/osmosnimki-maps.mapcss b/src/styles/osmosnimki-maps.mapcss index 9937302..e2f896a 100644 --- a/src/styles/osmosnimki-maps.mapcss +++ b/src/styles/osmosnimki-maps.mapcss @@ -161,7 +161,7 @@ area|z5-[natural=water], area|z10-[landuse=reservoir], {fill-color: #C4D4F5; color: #C4D4F5; width:.1; z-index:9;} -area|z9-[natural=water]{text:name; text-offset:1; font-size:10; font-family: DejaVu Serif Italic; text-color:#285fd1; text-allow-overlap: false;text-halo-radius: 1; text-halo-color: #ffffff; } +area|z9-[natural=water]{text:name; text-offset:1; font-size:10; font-family: DejaVu Serif Italic; text-color:#285fd1; text-allow-overlap: false } /* text - из какого поля брать текст text-offset - на сколько сдвинуть текст @@ -814,7 +814,7 @@ shields!!!! way|z10-[waterway=stream], way|z9-[waterway=river], way|z13-[waterway=canal] -{text:name; font-size:9; font-family: DejaVu Sans Oblique; text-color:#547bd1; text-halo-radius:1; text-halo-color:#ffffff; text-position: line} +{text:name; font-size:9; font-family: DejaVu Sans Oblique; text-color:#547bd1; text-position: line} node|z-3[place=continent] {text:name; text-offset:-10; font-size:10; font-family: DejaVu Sans ExtraLight; text-halo-radius:1; text-color:#202020;text-halo-color:#ffffff;z-index:-1;-x-mapnik-min-distance:0}