Fix for reshape problem with closed lines

git-svn-id: http://svn.osgeo.org/qgis/trunk@11807 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2009-10-15 08:16:59 +00:00
parent 6a00570abc
commit adeffe82d8

View File

@ -5181,13 +5181,6 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
return 0;
}
bool isRing = false;
if ( GEOSGeomTypeId( line ) == GEOS_LINEARRING )
{
isRing = true;
}
//begin and end point of original line
const GEOSCoordSequence* lineCoordSeq = GEOSGeom_getCoordSeq( line );
if ( !lineCoordSeq )
@ -5212,6 +5205,12 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
GEOSGeometry* beginLineVertex = createGeosPoint( QgsPoint( x1, y1 ) );
GEOSGeometry* endLineVertex = createGeosPoint( QgsPoint( x2, y2 ) );
bool isRing = false;
if ( GEOSGeomTypeId( line ) == GEOS_LINEARRING || GEOSEquals( beginLineVertex, endLineVertex ) == 1 )
{
isRing = true;
}
//node line and reshape line
GEOSGeometry* nodedGeometry = nodeGeometries( reshapeLineGeos, line );
if ( !nodedGeometry )