We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 34b9d39 commit c360e37Copy full SHA for c360e37
src/core/geometry/qgsgeometry.cpp
@@ -1873,7 +1873,10 @@ QgsGeometry QgsGeometry::centroid() const
1873
// avoid calling geos for trivial point centroids
1874
if ( QgsWkbTypes::flatType( d->geometry->wkbType() ) == QgsWkbTypes::Point )
1875
{
1876
- return *this;
+ QgsGeometry c = *this;
1877
+ c.get()->dropZValue();
1878
+ c.get()->dropMValue();
1879
+ return c;
1880
}
1881
1882
QgsGeos geos( d->geometry.get() );
0 commit comments