[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH ocitysmap 3/3] More straightforward sql queries
From: |
David Decotigny |
Subject: |
[Maposmatic-dev] [PATCH ocitysmap 3/3] More straightforward sql queries for *_by_osmid query functions |
Date: |
Mon, 21 Dec 2009 22:44:30 +0100 |
---
ocitysmap/street_index.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/ocitysmap/street_index.py b/ocitysmap/street_index.py
index bf26502..03416f0 100644
--- a/ocitysmap/street_index.py
+++ b/ocitysmap/street_index.py
@@ -340,9 +340,7 @@ class OCitySMap:
cursor = db.cursor()
cursor.execute("""select st_astext(st_transform(st_envelope(way),
4002))
from planet_osm_polygon
- where boundary='administrative' and
- admin_level='8' and
- osm_id=%d;""" % \
+ where osm_id=%d;""" % \
osmid)
records = cursor.fetchall()
if not records:
@@ -424,8 +422,7 @@ class OCitySMap:
st_difference(st_envelope(way),
st_buildarea(way)), 4002))
from planet_osm_polygon
- where boundary='administrative'
- and admin_level='8' and osm_id=%d;""" % \
+ where osm_id=%d;""" % \
osmid)
contour = cursor.fetchall()
return self.parse_city_contour(contour)
--
1.6.3.3