mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
6a00570abc
commit
adeffe82d8
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user