Open 3nids opened 7 years ago
isSpatial sounds good to me.
I'd also suggest we drop hasGeometryType in favour of QgsMapLayer::isSpatial. It's more flexible since it can be safely called with any layer type.
+1, hasGeometryType
sounds weird anyway
The base class has no virtual method to determine if the source has a geometry type. Sometimes a private var is used (which can be used thanks to the friend class), sometimes a method (such as
hasGeometry
,isSpatial
orhasDefinedGeometry
) and sometimes nothing.I would propose to add a pure virtual method to
QgsAbstractFeatureSource
and go withisSpatial
.On the same note, vector layer has the duplicate
isSpatial
andhasGeometryType
.