Skip to content
Permalink
Browse files

Catch errors when reprojecting for GeoJSON export

  • Loading branch information
nyalldawson committed May 7, 2016
1 parent 9ea56ac commit 718c5fde2ecce98dc354d6a82d1d331b01e1cc52
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/core/qgsjsonutils.cpp
@@ -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.
You can’t perform that action at this time.