[mapguide-commits] r7618 - sandbox/adsk/2.4j/Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jun 13 23:00:10 PDT 2013
Author: christinebao
Date: 2013-06-13 23:00:09 -0700 (Thu, 13 Jun 2013)
New Revision: 7618
Modified:
sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureService.cpp
Log:
#2258: Serve WFS in alternate CS: SRSNAME not respected in getfeature, alternate SRS not available
Fix bug of parsing primary SRS. It's possible to contain other SRS so need to find "_PrimarySRS" first.
Modified: sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureService.cpp
===================================================================
--- sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureService.cpp 2013-06-13 15:37:41 UTC (rev 7617)
+++ sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureService.cpp 2013-06-14 06:00:09 UTC (rev 7618)
@@ -1839,16 +1839,21 @@
// <Name>_PrimarySRS</Name>
// <Value>EPSG:4326</Value>
//</Property>
- std::string begin("EPSG:");
- std::size_t beginPos = resourceHeader.find(begin);
- if (beginPos != std::string::npos)
+ std::string primary("<Name>_PrimarySRS</Name>");
+ std::size_t primaryPos = resourceHeader.find(primary);
+ if (primaryPos != std::string::npos)
{
- std::size_t endPos = resourceHeader.find("</Value>", beginPos);
- if (endPos != std::string::npos)
+ std::string begin("<Value>EPSG:");
+ std::size_t beginPos = resourceHeader.find(begin, primaryPos);
+ if (beginPos != std::string::npos)
{
- std::string primarySRS = resourceHeader.substr(beginPos+begin.length(), endPos-beginPos-begin.length());
- int epsgCode = atoi(primarySRS.c_str());
- wkt = fact.ConvertEpsgCodeToWkt(epsgCode);
+ std::size_t endPos = resourceHeader.find("</Value>", beginPos);
+ if (endPos != std::string::npos)
+ {
+ std::string primarySRS = resourceHeader.substr(beginPos+begin.length(), endPos-beginPos-begin.length());
+ int epsgCode = atoi(primarySRS.c_str());
+ wkt = fact.ConvertEpsgCodeToWkt(epsgCode);
+ }
}
}
}
More information about the mapguide-commits
mailing list