qgis / qgis4.0_api

Tracker for QGIS 4.0 API related issues and developer discussion
3 stars 1 forks source link

Rename QgsGeometry::isEmpty() #72

Closed wonder-sk closed 7 years ago

wonder-sk commented 7 years ago

A better name for the method would be isNull()... as it checks whether QgsGeometry contains "nothing". This would avoid confusion with isGeosEmpty() which acts like ST_IsEmpty() from PostGIS and returns true for cases like empty geometry collection.

nyalldawson commented 7 years ago

True. Additionally - we shouldn't really require isGeosEmpty(), as it would be trivial to add a proper isEmpty() method which uses the qgis geometry classes and doesn't require the geos conversion.

nyalldawson commented 7 years ago

Fixed in https://github.com/qgis/QGIS/commit/8709e1f9d5e1ba4fa2c5b2a6bdc19e1248c4c3f5