3 changes: 1 addition & 2 deletions python/plugins/processing/admintools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FILE(GLOB PY_FILES *.py)

ADD_SUBDIRECTORY(geoserver)
ADD_SUBDIRECTORY(httplib2)

PLUGIN_INSTALL(processing ./admintools ${PY_FILES})
PLUGIN_INSTALL(processing ./admintools ${PY_FILES})
2 changes: 1 addition & 1 deletion python/plugins/processing/admintools/geoserver/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
UnsavedLayerGroup
from processing.admintools.geoserver.workspace import workspace_from_index, \
Workspace
from processing.admintools import httplib2
import httplib2


logger = logging.getLogger('gsconfig.catalog')
Expand Down
18 changes: 18 additions & 0 deletions src/core/qgsmaptopixelgeometrysimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,24 @@ bool QgsMapToPixelSimplifier::simplifyWkbGeometry( int simplifyFlags, QGis::WkbT
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 )
{
Expand Down