qgis / qgis4.0_api

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

Cleanup (and rename?) QgsGeometry #28

Open nyalldawson opened 8 years ago

nyalldawson commented 8 years ago

Since the merge of the new geometry engine, the role of QgsGeometry is undefined. It currently acts as just an implicitly shared container for a QgsAbstractGeometryV2, plus a random bunch of methods for modifying and converting the geometry.

I'd like to see this refined in QGIS 3.0. My thoughts:

What would remain in QgsGeometryContainer would be:

raymondnijssen commented 5 years ago
m-kuhn commented 5 years ago

@raymondnijssen I think parts of this does not require QGIS 4. Mainly because inheritance is not involved in the way your comment suggest.

You can already right now today add a new method

QgsGeometry QgsGeometry::buffer()
{
  .... write some code that calls QgsAbstractGeometry::buffer on the contained geometry.
}

PS: and I am very much in favor of doing this!! This will mean that there is less reason to actually call get() and constGet() which will make the API way easier to use.