Skip to content
Permalink
Browse files
Remedy for ticket #262 - when a SRS is considered invalid by geos, do…
…n'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
  • Loading branch information
g_j_m committed Nov 11, 2006
1 parent b095c61 commit 68871e4b68ad1d755369239853ed933209160918
Showing with 16 additions and 2 deletions.
  1. +16 −2 src/gui/qgscoordinatetransform.cpp
@@ -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;

0 comments on commit 68871e4

Please sign in to comment.