mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
b095c61ce0
commit
68871e4b68
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user