Remedy for ticket #262 - when a SRS is considered invalid by geos, don't call assert(), but rather just refuse to transform the point.

The real issue is why are some of the projections in qgis's database considered invalid by geos?


git-svn-id: http://svn.osgeo.org/qgis/trunk@6076 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
g_j_m 2006-11-11 04:47:45 +00:00
parent b095c61ce0
commit 68871e4b68

View File

@ -388,8 +388,22 @@ QgsRect QgsCoordinateTransform::transformBoundingBox(const QgsRect rect, Transfo
void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, double *y, double *z,TransformDirection direction)
{
assert(mSourceSRS.isValid());
assert(mDestSRS.isValid());
// Refuse to transform the points if the srs's are invalid
if (!mSourceSRS.isValid())
{
QgsLogger::critical( tr("The source spatial reference system (SRS) is not valid. ") +
tr("The coordinates can not be reprojected. The SRS is: ") +
mSourceSRS.proj4String() );
return;
}
if (!mDestSRS.isValid())
{
QgsLogger::critical( tr("The destination spatial reference system (SRS) is not valid. ") +
tr("The coordinates can not be reprojected. The SRS is: ") +
mDestSRS.proj4String() );
return;
}
#ifdef QGISDEBUG
//double xorg = x;
//double yorg = y;