[mapguide-commits] r7543 - trunk/MgDev/Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu May 30 01:45:31 PDT 2013
Author: christinebao
Date: 2013-05-30 01:45:31 -0700 (Thu, 30 May 2013)
New Revision: 7543
Modified:
trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
Log:
#2258: Serve WFS in alternate CS: SRSNAME not respected in getfeature, alternate SRS not available
- Handle request with EPSG:0, as user is possible to define arbitrary X-Y data source, so that no transformation should happen.
Modified: trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp 2013-05-30 08:30:27 UTC (rev 7542)
+++ trunk/MgDev/Server/src/Services/Feature/ServerFeatureService.cpp 2013-05-30 08:45:31 UTC (rev 7543)
@@ -1858,7 +1858,13 @@
}
}
- Ptr<MgCoordinateSystem> mapCs = (wkt.empty()) ? NULL : fact.Create(wkt);
+ Ptr<MgCoordinateSystem> mapCs = NULL;
+ if (!wkt.empty())
+ {
+ MG_TRY();
+ mapCs = fact.Create(wkt);
+ MG_CATCH_AND_RELEASE();
+ }
//get a transform from feature space to mapping space
TransformCache* item = TransformCache::GetLayerToMapTransform(transformCache, lfeatureName, fs, mapCs, &fact, this);
@@ -2356,6 +2362,12 @@
FdoIDirectPosition* MgGMLCsTransform::CoordinateSystemTransform(FdoIDirectPosition* sourceGeometry)
{
+ //if not suitable transform available, return the original geometry.
+ if (mTransform == NULL)
+ {
+ return FDO_SAFE_ADDREF(sourceGeometry);
+ }
+
double x = sourceGeometry->GetX();
double y = sourceGeometry->GetY();
double z = 0;
More information about the mapguide-commits
mailing list