[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH] multi-page index: filter items outside the town
From: |
Étienne Loks |
Subject: |
[Maposmatic-dev] [PATCH] multi-page index: filter items outside the town |
Date: |
Sat, 31 Mar 2012 00:37:02 +0200 |
---
ocitysmap2/layoutlib/multi_page_renderer.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ocitysmap2/layoutlib/multi_page_renderer.py
b/ocitysmap2/layoutlib/multi_page_renderer.py
index 0bbae2c..dede9f8 100644
--- a/ocitysmap2/layoutlib/multi_page_renderer.py
+++ b/ocitysmap2/layoutlib/multi_page_renderer.py
@@ -243,9 +243,9 @@ class MultiPageRenderer(Renderer):
# Create the contour shade
# Area to keep visible
- interior = shapely.wkt.loads(self.rc.polygon_wkt)
+ interior_contour = shapely.wkt.loads(self.rc.polygon_wkt)
# Determine the shade WKT
- shade_contour_wkt = exterior.difference(interior).wkt
+ shade_contour_wkt = exterior.difference(interior_contour).wkt
# Prepare the shade SHP
shade_contour = maplib.shapes.PolyShapeFile(bb,
os.path.join(self.tmpdir, 'shade_contour%d.shp' % i),
@@ -277,8 +277,9 @@ class MultiPageRenderer(Renderer):
self.pages.append((map_canvas, map_grid, None))
# Create the index for the current page
+ inside_contour_wkt = interior_contour.intersection(interior).wkt
index = StreetIndex(self.db,
- bb_inner.as_wkt(),
+ inside_contour_wkt,
self.rc.i18n, page_number=(i + 3))
index.apply_grid(map_grid)
--
1.7.9.1
- [Maposmatic-dev] [PATCH] multi-page index: filter items outside the town,
Étienne Loks <=