The following commit has been merged in the master branch:
commit c4f42a00ae3e42d0cebb8b29eb700aa26791dffa
Author: David Paleino <da...@debian.org>
Date:   Tue Oct 25 23:23:58 2011 +0200

    Port code to Mapnik2 (Closes: #646452)

diff --git a/debian/changelog b/debian/changelog
index 93bbc42..f8e3ce4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+monav (0.3-6) UNRELEASED; urgency=low
+
+  * Port code to Mapnik2 (Closes: #646452)
+
+ -- David Paleino <da...@debian.org>  Tue, 25 Oct 2011 23:23:35 +0200
+
 monav (0.3-5) unstable; urgency=low
 
   * Backport fix to avoid freezing when GPSd is not available, thanks
diff --git a/debian/patches/07-port_to_mapnik2.patch 
b/debian/patches/07-port_to_mapnik2.patch
new file mode 100644
index 0000000..facb126
--- /dev/null
+++ b/debian/patches/07-port_to_mapnik2.patch
@@ -0,0 +1,72 @@
+From: David Paleino <da...@debian.org>
+Subject: port code to Mapnik2
+Origin: vendor
+Forwarded: no
+
+---
+ plugins/osmrenderer/mapnikrenderer.cpp |   10 +++++-----
+ plugins/osmrenderer/mapnikrenderer.pro |    2 +-
+ preprocessor/preprocessor-gui.pro      |    2 +-
+ preprocessor/preprocessor.pro          |    2 +-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+--- monav.orig/plugins/osmrenderer/mapnikrenderer.cpp
++++ monav/plugins/osmrenderer/mapnikrenderer.cpp
+@@ -264,7 +264,7 @@ bool MapnikRenderer::Preprocess( IImport
+                       const int metaTileSize = m_settings.metaTileSize * 
m_settings.tileSize + 2 * m_settings.margin;
+ 
+                       mapnik::Map map;
+-                      mapnik::Image32 image( metaTileSize, metaTileSize );
++                      mapnik::image_32 image( metaTileSize, metaTileSize );
+                       QTemporaryFile tempOut;
+                       QTemporaryFile tempIn;
+                       mapnik::load_map( map, 
m_settings.theme.toLocal8Bit().constData() );
+@@ -288,9 +288,9 @@ bool MapnikRenderer::Preprocess( IImport
+                               GPSCoordinate drawBottomRightGPS = 
drawBottomRight.ToGPSCoordinate();
+                               projection.forward( drawTopLeftGPS.longitude, 
drawBottomRightGPS.latitude );
+                               projection.forward( 
drawBottomRightGPS.longitude, drawTopLeftGPS.latitude );
+-                              mapnik::Envelope<double> boundingBox( 
drawTopLeftGPS.longitude, drawTopLeftGPS.latitude, 
drawBottomRightGPS.longitude, drawBottomRightGPS.latitude );
+-                              map.zoomToBox( boundingBox );
+-                              mapnik::agg_renderer<mapnik::Image32> renderer( 
map, image );
++                              mapnik::box2d<double> boundingBox( 
drawTopLeftGPS.longitude, drawTopLeftGPS.latitude, 
drawBottomRightGPS.longitude, drawBottomRightGPS.latitude );
++                              map.zoom_to_box( boundingBox );
++                              mapnik::agg_renderer<mapnik::image_32> 
renderer( map, image );
+                               renderer.apply();
+ 
+                               std::string data;
+@@ -299,7 +299,7 @@ bool MapnikRenderer::Preprocess( IImport
+                               for ( int subX = 0; subX < metaTileSizeX; 
++subX ) {
+                                       for ( int subY = 0; subY < 
metaTileSizeY; ++subY ) {
+                                               int indexNumber = ( y + subY - 
info.minY ) * ( info.maxX - info.minX ) + x + subX - info.minX;
+-                                              
mapnik::image_view<mapnik::ImageData32> view = image.get_view( subX * 
m_settings.tileSize + m_settings.margin, subY * m_settings.tileSize + 
m_settings.margin, m_settings.tileSize, m_settings.tileSize );
++                                              
mapnik::image_view<mapnik::image_data_32> view = image.get_view( subX * 
m_settings.tileSize + m_settings.margin, subY * m_settings.tileSize + 
m_settings.margin, m_settings.tileSize, m_settings.tileSize );
+                                               std::string result;
+                                               if ( !m_settings.deleteTiles || 
info.index[( x + subX - info.minX ) + ( y + subY - info.minY ) * ( info.maxX - 
info.minX )].size == 1 ) {
+                                                       if ( 
m_settings.reduceColors )
+--- monav.orig/plugins/osmrenderer/mapnikrenderer.pro
++++ monav/plugins/osmrenderer/mapnikrenderer.pro
+@@ -22,7 +22,7 @@ unix {
+                -fopenmp
+ }
+ LIBS += -fopenmp \
+-       -lmapnik
++       -lmapnik2
+ 
+ !nogui {
+       FORMS += mrsettingsdialog.ui
+--- monav.orig/preprocessor/preprocessor-gui.pro
++++ monav/preprocessor/preprocessor-gui.pro
+@@ -51,4 +51,4 @@ unix {
+                -fopenmp
+ }
+ LIBS += -L../bin/plugins_preprocessor -lmapnikrenderer 
-lcontractionhierarchies -lgpsgrid -losmrenderer -lqtilerenderer 
-lunicodetournamenttrie -losmimporter
+-LIBS += -fopenmp -lmapnik -lbz2 -lz
++LIBS += -fopenmp -lmapnik2 -lbz2 -lz
+--- monav.orig/preprocessor/preprocessor.pro
++++ monav/preprocessor/preprocessor.pro
+@@ -45,4 +45,4 @@ unix {
+                -fopenmp
+ }
+ LIBS += -L../bin/plugins_preprocessor -lmapnikrenderer 
-lcontractionhierarchies -lgpsgrid -losmrenderer -lqtilerenderer 
-lunicodetournamenttrie -losmimporter -ltestimporter
+-LIBS += -fopenmp -lmapnik -lbz2 -lz
++LIBS += -fopenmp -lmapnik2 -lbz2 -lz
diff --git a/debian/patches/series b/debian/patches/series
index fb1f079..498d960 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 04-fix_typos.patch
 05-drop_marchnative.patch
 06-implement_gpsd_interface.patch
+07-port_to_mapnik2.patch

-- 
fast navigation system featuring exact routing

_______________________________________________
Pkg-osm-commits mailing list
Pkg-osm-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-osm-commits

Reply via email to