Skip to content

Commit 8cdf0d6

Browse files
committed
Fix numerical problems in reshape tool
1 parent 211d28b commit 8cdf0d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/geometry/qgsgeos.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ int QgsGeos::lineContainedInLine( const GEOSGeometry* line1, const GEOSGeometry*
19471947
return -1;
19481948
}
19491949

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

19521952
GEOSGeometry* bufferGeom = GEOSBuffer_r( geosinit.ctxt, line2, bufferDistance, DEFAULT_QUADRANT_SEGMENTS );
19531953
if ( !bufferGeom )
@@ -1977,7 +1977,7 @@ int QgsGeos::pointContainedInLine( const GEOSGeometry* point, const GEOSGeometry
19771977
if ( !point || !line )
19781978
return -1;
19791979

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

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

0 commit comments

Comments
 (0)