Skip to content

Commit

Permalink
Fix #10999 (reshape tool throws GEOS exceptions)
Browse files Browse the repository at this point in the history
Exceptions fixed earlier by @mkuhn in 37f1a1
Numerical problems found by @arnaud-morvan, corrected by @jef-n
  • Loading branch information
wonder-sk committed Oct 22, 2014
1 parent f2b7c0f commit 037138f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsgeometry.cpp
Expand Up @@ -5231,7 +5231,7 @@ int QgsGeometry::lineContainedInLine( const GEOSGeometry* line1, const GEOSGeome
return -1;
}

double bufferDistance = pow( 1.0L, geomDigits( line2 ) - 11 );
double bufferDistance = pow( 10.0L, geomDigits( line2 ) - 11 );

GEOSGeometry* bufferGeom = GEOSBuffer_r( geosinit.ctxt, line2, bufferDistance, DEFAULT_QUADRANT_SEGMENTS );
if ( !bufferGeom )
Expand Down Expand Up @@ -5261,7 +5261,7 @@ int QgsGeometry::pointContainedInLine( const GEOSGeometry* point, const GEOSGeom
if ( !point || !line )
return -1;

double bufferDistance = pow( 1.0L, geomDigits( line ) - 11 );
double bufferDistance = pow( 10.0L, geomDigits( line ) - 11 );

GEOSGeometry* lineBuffer = GEOSBuffer_r( geosinit.ctxt, line, bufferDistance, 8 );
if ( !lineBuffer )
Expand Down

0 comments on commit 037138f

Please sign in to comment.