Skip to content

Commit

Permalink
Fix numerical problems in reshape tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 6, 2015
1 parent 211d28b commit 8cdf0d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/geometry/qgsgeos.cpp
Expand Up @@ -1947,7 +1947,7 @@ int QgsGeos::lineContainedInLine( const GEOSGeometry* line1, const GEOSGeometry*
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 @@ -1977,7 +1977,7 @@ int QgsGeos::pointContainedInLine( const GEOSGeometry* point, const GEOSGeometry
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 8cdf0d6

Please sign in to comment.