Skip to content
Permalink
Browse files
Fix bounding box calculation of geometry collections, fix #4102
  • Loading branch information
nyalldawson committed Dec 4, 2015
1 parent 2794ea1 commit 7e3dc30
Showing 1 changed file with 7 additions and 0 deletions.
@@ -72,6 +72,7 @@ void QgsGeometryCollectionV2::clear()
qDeleteAll( mGeometries );
mGeometries.clear();
mWkbType = QgsWKBTypes::Unknown;
mBoundingBox = QgsRectangle(); //set bounding box invalid
}

int QgsGeometryCollectionV2::numGeometries() const
@@ -105,6 +106,7 @@ bool QgsGeometryCollectionV2::addGeometry( QgsAbstractGeometryV2* g )
}

mGeometries.append( g );
mBoundingBox = QgsRectangle(); //set bounding box invalid
return true;
}

@@ -116,6 +118,7 @@ bool QgsGeometryCollectionV2::insertGeometry( QgsAbstractGeometryV2 *g, int inde
}

mGeometries.insert( index, g );
mBoundingBox = QgsRectangle(); //set bounding box invalid
return true;
}

@@ -127,6 +130,7 @@ bool QgsGeometryCollectionV2::removeGeometry( int nr )
}
delete mGeometries[nr];
mGeometries.remove( nr );
mBoundingBox = QgsRectangle(); //set bounding box invalid
return true;
}

@@ -152,6 +156,7 @@ void QgsGeometryCollectionV2::transform( const QgsCoordinateTransform& ct, QgsCo
{
( *it )->transform( ct, d );
}
mBoundingBox = QgsRectangle(); //set bounding box invalid
}

void QgsGeometryCollectionV2::transform( const QTransform& t )
@@ -161,6 +166,7 @@ void QgsGeometryCollectionV2::transform( const QTransform& t )
{
( *it )->transform( t );
}
mBoundingBox = QgsRectangle(); //set bounding box invalid
}

#if 0
@@ -211,6 +217,7 @@ bool QgsGeometryCollectionV2::fromWkb( const unsigned char * wkb )
{
mGeometries[i] = geometryList.at( i );
}
mBoundingBox = QgsRectangle(); //set bounding box invalid

return true;
}

0 comments on commit 7e3dc30

Please sign in to comment.