Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Catch errors when reprojecting for GeoJSON export
- Loading branch information
Showing
with
11 additions
and
3 deletions.
-
+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(); |
|
|
|
|
|