On Tue, Apr 5, 2011 at 8:33 AM, Goo Creations <[email protected]> wrote: > Hi all > > I'm doing the following to transform coordinates: > > ct = QgsCoordinateTransform() > ct.setSourceCrs(sourceCRS) > ct.setDestCRS(destinationCRS) > point1 = ct.transform(aPoint) > > Everything works fine, until the users enters coordinates that are invalid > for the source CRS. Qgis crashes with the following errors: > > qgscoordinatetransform.cpp: 485: (transformCoords) Projection failed > emitting invalid transform signal: forward transform of (44038.4, -33923.3) > failed with error: latitude or longitude exceeded limits > > qgscoordinatetransform.cpp: 489: (transformCoords) throwing exception > qgscoordinatetransform.cpp: 226: (transform) rethrowing exception > terminate called after throwing an instance of 'QgsCsException' > Aborted > > I've tried to catch QgsCsException, but qgscoordinatetransform still > terminates Qgis before the exception can be caught. > I've also tried connecting the invalidTransformInput() signal, which > successfully executes (but Qgis is still terminated afterwards).
Unfortunately as of now there is no exception handling in the python bindings (coordinate transform is probably the only one exception used in public api). Please file a bug for this issue, we should have a look at it (if possible provide also the definitions of of source/destination CRS of easier replication of the error). Regards Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
