Fix #10999 (reshape tool throws GEOS exceptions)

Exceptions fixed earlier by @mkuhn in 37f1a1
Numerical problems found by @arnaud-morvan, corrected by @jef-n
This commit is contained in:
Martin Dobias 2014-10-22 11:34:52 +07:00
parent f2b7c0fcf8
commit 037138fae5

View File

@ -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 )
@ -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 )