[mapserver-commits] r7730 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Jun 23 17:57:41 EDT 2008
Author: tomkralidis
Date: 2008-06-23 17:57:41 -0400 (Mon, 23 Jun 2008)
New Revision: 7730
Modified:
trunk/mapserver/mapogcsos.c
Log:
strip <ogc:TM_Equals> tags before passing to time parser (#2560)
Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c 2008-06-23 21:41:38 UTC (rev 7729)
+++ trunk/mapserver/mapogcsos.c 2008-06-23 21:57:41 UTC (rev 7730)
@@ -2049,7 +2049,23 @@
int numtimes = 0;
char *pszTimeString = NULL, *pszTmp = NULL;
- apszTimes = msStringSplit (sosparams->pszEventTime, ',', &numtimes);
+ /* Because SOS has specific TemporalOperator which extends FES 1.1, the time filter */
+ /* passed is different than what mapogcfilter (per 1.0.0) supports. */
+ /* */
+ /* Because, in XML POST mode, we traverse directly to gml:TimePeriod|gml:TimeInstant */
+ /* this is passed directly to mapogcfilter. */
+ /* for GET requests, we strip the parent element before passing */
+
+ pszTmp = strdup(sosparams->pszEventTime);
+
+ pszTmp = msCaseReplaceSubstring(pszTmp, "<ogc:TM_Equals>", "");
+ pszTmp = msCaseReplaceSubstring(pszTmp, "<TM_Equals>", "");
+ pszTmp = msCaseReplaceSubstring(pszTmp, "</ogc:TM_Equals>", "");
+ pszTmp = msCaseReplaceSubstring(pszTmp, "</TM_Equals>", "");
+
+ apszTimes = msStringSplit (pszTmp, ',', &numtimes);
+ msFree(pszTmp);
+
if (numtimes >=1) {
for (i=0; i<numtimes; i++) {
pszTmp = msSOSParseTimeGML(apszTimes[i]);
More information about the mapserver-commits
mailing list