mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[ogr] Also discard features with empty geometries
when feature request specifies a filter rect OGR sometimes returns a feature with empty geometry (e.g. a multipolygon with a polygon child with no rings) even when OGR_L_SetSpatialFilterRect has been set for the layer. Refs #17365
This commit is contained in:
parent
eea155d6e2
commit
f4d3152eea
@ -266,7 +266,7 @@ bool QgsOgrFeatureIterator::fetchFeature( QgsFeature &feature )
|
||||
if ( !readFeature( std::move( fet ), feature ) )
|
||||
continue;
|
||||
|
||||
if ( !mFilterRect.isNull() && !feature.hasGeometry() )
|
||||
if ( !mFilterRect.isNull() && ( !feature.hasGeometry() || feature.geometry().isEmpty() ) )
|
||||
continue;
|
||||
|
||||
// we have a feature, end this cycle
|
||||
|
Loading…
x
Reference in New Issue
Block a user