[mapserver-commits] r10374 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Jul 17 10:44:37 EDT 2010
Author: warmerdam
Date: 2010-07-17 14:44:37 +0000 (Sat, 17 Jul 2010)
New Revision: 10374
Modified:
trunk/mapserver/mapogcfilter.c
Log:
more attempts to return errors in reprojection (#3495)
Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c 2010-07-17 14:38:41 UTC (rev 10373)
+++ trunk/mapserver/mapogcfilter.c 2010-07-17 14:44:37 UTC (rev 10374)
@@ -153,7 +153,7 @@
return MS_TRUE;
}
-int FTLParseEpsgString(char *pszEpsg, projectionObj *psProj)
+int FLTParseEpsgString(char *pszEpsg, projectionObj *psProj)
{
int nStatus = MS_FALSE;
int nTokens = 0;
@@ -329,8 +329,14 @@
/* -------------------------------------------------------------------- */
if(szEPSG && map->projection.numargs > 0)
{
- if (FTLParseEpsgString(szEPSG, &sProjTmp))
- msProjectRect(&sProjTmp, &map->projection, &sQueryRect);
+ if (FLTParseEpsgString(szEPSG, &sProjTmp))
+ {
+ if( msProjectRect(&sProjTmp, &map->projection, &sQueryRect)
+ != MS_SUCCESS )
+ return MS_FAILURE;
+ }
+ else
+ return MS_FAILURE;
}
@@ -343,11 +349,17 @@
} else if (bPointQuery && psQueryShape && psQueryShape->numlines > 0
&& psQueryShape->line[0].numpoints > 0) /* && dfDistance >=0) */
{
- if (psNode->pszSRS && map->projection.numargs > 0 &&
- FTLParseEpsgString(psNode->pszSRS, &sProjTmp))
- msProjectShape(&sProjTmp, &map->projection, psQueryShape);
+ if (psNode->pszSRS && map->projection.numargs > 0 )
+ {
+ if( !FLTParseEpsgString(psNode->pszSRS, &sProjTmp) )
+ return MS_FAILURE;
- if (bUseGeos)
+ status = msProjectShape(&sProjTmp, &map->projection, psQueryShape);
+ if( status != MS_SUCCESS )
+ return status;
+ }
+
+ if (bUseGeos)
{
if ((strcasecmp(psNode->pszValue, "DWithin") == 0 ||
strcasecmp(psNode->pszValue, "Beyond") == 0 ) &&
@@ -405,7 +417,7 @@
/*reproject shape if epsg was set*/
if (psNode->pszSRS && map->projection.numargs > 0 )
{
- if( !FTLParseEpsgString(psNode->pszSRS, &sProjTmp) )
+ if( !FLTParseEpsgString(psNode->pszSRS, &sProjTmp) )
return MS_FAILURE;
status = msProjectShape(&sProjTmp, &map->projection, psQueryShape);
More information about the mapserver-commits
mailing list