Skip to content
Permalink
Browse files
Catch errors when reprojecting for GeoJSON export
  • Loading branch information
nyalldawson committed May 9, 2016
1 parent 9ea56ac commit 718c5fd
Showing 1 changed file with 11 additions and 3 deletions.
@@ -78,10 +78,18 @@ QString QgsJSONExporter::exportFeature( const QgsFeature& feature, const QVarian
if ( mCrs.isValid() )
{
QgsGeometry* clone = new QgsGeometry( *geom );
if ( clone->transform( mTransform ) == 0 )
exportGeom = clone;
else
try
{
if ( clone->transform( mTransform ) == 0 )
exportGeom = clone;
else
delete clone;
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse );
delete clone;
}
}
QgsRectangle box = exportGeom->boundingBox();

0 comments on commit 718c5fd

Please sign in to comment.