[Qgis-developer] Qgis crash after transforming invalid coordinates
goocreations at gmail.com
Tue Apr 5 02:33:07 EDT 2011
I'm doing the following to transform coordinates:
*ct = QgsCoordinateTransform()*
*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'*
I've tried to catch *QgsCsException, *but *qgscoordinatetransform *still
terminates Qgis before the exception can be caught.
I've also tried connecting the
signal, which successfully executes (but Qgis is still terminated
Is there a way to test the coordinates before trying to transform them,
since I will be out of my control what the user enters? I can't find
anything in QgsCoordinateTransform.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer