Skip to content

Commit ad6c46f

Browse files
committedJun 11, 2017
When using destination CRS in a feature request and a transform
exception occurs, clear the feature's geometry before returning We never want to return features with mixed CRS geometries.
1 parent 31162ad commit ad6c46f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/core/qgsfeatureiterator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ void QgsAbstractFeatureIterator::geometryToDestinationCrs( QgsFeature &feature,
115115
{
116116
mRequest.transformErrorCallback()( feature );
117117
}
118+
// remove geometry - we can't reproject so better not return a geometry in a different crs
119+
feature.clearGeometry();
118120
}
119121
}
120122
}

0 commit comments

Comments
 (0)
Please sign in to comment.