Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Function name without get, changed more function calls to use numberO…
…fGeometries()

git-svn-id: http://svn.osgeo.org/qgis/trunk@9713 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 27, 2008
1 parent 52c76d5 commit 59f4b3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/core/qgsgeometry.cpp
Expand Up @@ -4832,7 +4832,7 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
GEOSGeometry *cutEdges = GEOSPolygonizer_getCutEdges( &nodedGeometry, 1 );
if ( cutEdges )
{
if ( GEOSGetNumGeometries( cutEdges ) > 0 )
if ( numberOfGeometries( cutEdges ) > 0 )
{
GEOSGeom_destroy( cutEdges );
GEOSGeom_destroy( nodedGeometry );
Expand All @@ -4844,7 +4844,7 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
#endif

GEOSGeometry *polygons = GEOSPolygonize( &nodedGeometry, 1 );
if ( !polygons || GEOSGetNumGeometries( polygons ) == 0 )
if ( !polygons || numberOfGeometries( polygons ) == 0 )
{
if ( polygons )
GEOSGeom_destroy( polygons );
Expand All @@ -4864,7 +4864,7 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
//ratio intersect geometry / geometry. This should be close to 1
//if the polygon belongs to the input geometry

for ( int i = 0; i < getNumberOfGeometries( polygons ); i++ )
for ( int i = 0; i < numberOfGeometries( polygons ); i++ )
{
const GEOSGeometry *polygon = GEOSGetGeometryN( polygons, i );
intersectGeometry = GEOSIntersection( mGeos, polygon );
Expand All @@ -4883,7 +4883,7 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
}

bool splitDone = true;
int nGeometriesThis = getNumberOfGeometries( mGeos ); //original number of geometries
int nGeometriesThis = numberOfGeometries( mGeos ); //original number of geometries
if ( testedGeometries.size() == nGeometriesThis )
{
splitDone = false;
Expand Down Expand Up @@ -5003,7 +5003,7 @@ GEOSGeometry *QgsGeometry::nodeGeometries( const GEOSGeometry *splitLine, GEOSGe
return unionGeometry;
}

int QgsGeometry::getNumberOfGeometries(GEOSGeometry* g) const
int QgsGeometry::numberOfGeometries(GEOSGeometry* g) const
{
if(!g)
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgeometry.h
Expand Up @@ -418,7 +418,7 @@ class CORE_EXPORT QgsGeometry
GEOSGeometry* nodeGeometries( const GEOSGeometry *splitLine, GEOSGeometry *poly ) const;

/**Returns number of single geometry in a geos geometry. Is save for geos 2 and 3*/
int getNumberOfGeometries(GEOSGeometry* g) const;
int numberOfGeometries(GEOSGeometry* g) const;

int mergeGeometriesMultiTypeSplit( QVector<GEOSGeometry*>& splitResult );

Expand Down

0 comments on commit 59f4b3f

Please sign in to comment.