[qgis] 03/07: Add patch from upstream release_2.2 branch: 0001-9686-fix-simplification-of-no-closed-polygons.patch

Bas Couwenberg sebastic at xs4all.nl
Fri Mar 14 01:05:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository qgis.

commit 146a60ffe829eda385a5e4d998c275789ec4bc38
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Mar 13 21:36:10 2014 +0100

    Add patch from upstream release_2.2 branch: 0001-9686-fix-simplification-of-no-closed-polygons.patch
---
 ...-fix-simplification-of-no-closed-polygons.patch | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/debian/patches/0001-9686-fix-simplification-of-no-closed-polygons.patch b/debian/patches/0001-9686-fix-simplification-of-no-closed-polygons.patch
new file mode 100644
index 0000000..14f232f
--- /dev/null
+++ b/debian/patches/0001-9686-fix-simplification-of-no-closed-polygons.patch
@@ -0,0 +1,38 @@
+From c0cbfac5b1dd3d444d500a7c1e6f00edd385f4d5 Mon Sep 17 00:00:00 2001
+From: ahuarte47 <ahuarte47 at yahoo.es>
+Date: Sun, 2 Mar 2014 14:53:48 +0100
+Subject: #9686: fix simplification of no-closed polygons
+Origin: https://github.com/qgis/QGIS/commit/c0cbfac5b1dd3d444d500a7c1e6f00edd385f4d5
+Bug: http://hub.qgis.org/issues/9686
+
+---
+ src/core/qgsmaptopixelgeometrysimplifier.cpp |   18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/src/core/qgsmaptopixelgeometrysimplifier.cpp
++++ b/src/core/qgsmaptopixelgeometrysimplifier.cpp
+@@ -207,6 +207,24 @@ bool QgsMapToPixelSimplifier::simplifyWk
+     double* ptr = ( double* )targetWkb;
+     map2pixelTol *= map2pixelTol; //-> Use mappixelTol for 'LengthSquare' calculations.
+ 
++    // Check whether the LinearRing is really closed.
++    if ( isaLinearRing )
++    {
++      double x1, y1, x2, y2;
++
++      unsigned char* startWkbX = sourceWkb;
++      unsigned char* startWkbY = startWkbX + sizeOfDoubleX;
++      unsigned char* finalWkbX = sourceWkb + ( numPoints - 1 ) * ( sizeOfDoubleX + sizeOfDoubleY );
++      unsigned char* finalWkbY = finalWkbX + sizeOfDoubleX;
++
++      memcpy( &x1, startWkbX, sizeof( double ) );
++      memcpy( &y1, startWkbY, sizeof( double ) );
++      memcpy( &x2, finalWkbX, sizeof( double ) );
++      memcpy( &y2, finalWkbY, sizeof( double ) );
++
++      isaLinearRing = ( x1 == x2 ) && ( y1 == y2 );
++    }
++
+     // Process each vertex...
+     for ( int i = 0, numPoints_i = ( isaLinearRing ? numPoints - 1 : numPoints ); i < numPoints_i; ++i )
+     {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git



More information about the Pkg-grass-devel mailing list