Skip to content
Permalink
Browse files

Fix geometry length and area calculation (fix #12827)

  • Loading branch information
nyalldawson committed Jun 1, 2015
1 parent 5462e40 commit e295c1fbb7b6e68e0d0088e50280950b39a2d942
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/geometry/qgsgeos.cpp
@@ -270,7 +270,8 @@ double QgsGeos::area() const

try
{
area = GEOSArea_r( geosinit.ctxt, mGeos, &area );
if ( GEOSArea_r( geosinit.ctxt, mGeos, &area ) != 1 )
return -1.0;
}
CATCH_GEOS( -1.0 );
return area;
@@ -285,7 +286,8 @@ double QgsGeos::length() const
}
try
{
length = GEOSLength_r( geosinit.ctxt, mGeos, &length );
if ( GEOSLength_r( geosinit.ctxt, mGeos, &length ) != 1 )
return -1.0;
}
CATCH_GEOS( -1.0 )
return length;

0 comments on commit e295c1f

Please sign in to comment.
You can’t perform that action at this time.