diff --git a/src/komap.py b/src/komap.py index 66645d1..742730f 100644 --- a/src/komap.py +++ b/src/komap.py @@ -447,7 +447,13 @@ for zoom, zsheet in mapniksheet.iteritems(): sqlz = " OR ".join(sql) itags = ", ".join(itags) #itags = "\""+ itags+"\"" - sqlz = """select %s, ST_PointOnSurface(way) as way + if zoom >= 10: + sqlz = """select %s, ST_PointOnSurface(way) as way + from planet_osm_%s + where (%s) and (%s) and way && ST_Expand(!bbox!,3000) order by way_area + """%(itags,layer_type,ttext,sqlz) + else: + sqlz = """select %s, ST_PointOnSurface(way) as way from ( select (ST_Dump(ST_Multi(ST_Buffer(ST_Collect(p.way),0)))).geom as way, %s from (