[mapserver-commits] r7415 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Feb 27 15:56:54 EST 2008
Author: tomkralidis
Date: 2008-02-27 15:56:54 -0500 (Wed, 27 Feb 2008)
New Revision: 7415
Modified:
trunk/mapserver/mapogcsos.c
Log:
s/sensorid/procedure/g for msSOSDescribeSensor (#2467)
Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c 2008-02-27 20:10:15 UTC (rev 7414)
+++ trunk/mapserver/mapogcsos.c 2008-02-27 20:56:54 UTC (rev 7415)
@@ -2441,9 +2441,9 @@
return msSOSException(map, "outputformat", "InvalidParameterValue");
}
- if (!sosparams->pszSensorId) {
- msSetError(MS_SOSERR, "Missing mandatory parameter sensorid", "msSOSDescribeSensor()");
- return msSOSException(map, "sensorid", "MissingParameterValue");
+ if (!sosparams->pszProcedure) {
+ msSetError(MS_SOSERR, "Missing mandatory parameter procedure", "msSOSDescribeSensor()");
+ return msSOSException(map, "procedure", "MissingParameterValue");
}
for (i=0; i<map->numlayers; i++) {
@@ -2456,7 +2456,7 @@
int bFound = 0;
tokens = msStringSplit(pszId, ' ', &n);
for (k=0; k<n; k++) {
- if (tokens[k] && strlen(tokens[k]) > 0 && strcasecmp(tokens[k], sosparams->pszSensorId) == 0) {
+ if (tokens[k] && strlen(tokens[k]) > 0 && strcasecmp(tokens[k], sosparams->pszProcedure) == 0) {
bFound = 1;
msFreeCharArray(tokens, n);
break;
@@ -2472,7 +2472,7 @@
tmpstr = (char *)malloc(sizeof(char)*strlen("procedure") + 3);
sprintf(tmpstr,"%%%s%%", "procedure");
if (msCaseFindSubstring(pszUrl, tmpstr) != NULL)
- pszTmp = msCaseReplaceSubstring(pszTmp, tmpstr, sosparams->pszSensorId);
+ pszTmp = msCaseReplaceSubstring(pszTmp, tmpstr, sosparams->pszProcedure);
msFree(tmpstr);
pszEncodedUrl = msEncodeHTMLEntities(pszTmp);
@@ -2512,7 +2512,7 @@
if(status != MS_SUCCESS)
continue;
- if (sShape.values[iItemPosition] && strcasecmp(sShape.values[iItemPosition], sosparams->pszSensorId) == 0) {
+ if (sShape.values[iItemPosition] && strcasecmp(sShape.values[iItemPosition], sosparams->pszProcedure) == 0) {
pszUrl = msOWSLookupMetadata(&(lp->metadata), "S", "describesensor_url");
if (pszUrl) {
pszTmp = strdup(pszUrl);
@@ -2522,7 +2522,7 @@
tmpstr = (char *)malloc(sizeof(char)*strlen("procedure") + 3);
sprintf(tmpstr,"%%%s%%", "procedure");
if (msCaseFindSubstring(pszUrl, tmpstr) != NULL)
- pszTmp = msCaseReplaceSubstring(pszTmp, tmpstr, sosparams->pszSensorId);
+ pszTmp = msCaseReplaceSubstring(pszTmp, tmpstr, sosparams->pszProcedure);
msFree(tmpstr);
pszEncodedUrl = msEncodeHTMLEntities(pszTmp);
@@ -2541,8 +2541,8 @@
}
}
}
- msSetError(MS_SOSERR, "sensorid %s not found.", "msSOSDescribeSensor()", sosparams->pszSensorId);
- return msSOSException(map, "sensorid", "InvalidParameterValue");
+ msSetError(MS_SOSERR, "procedure %s not found.", "msSOSDescribeSensor()", sosparams->pszProcedure);
+ return msSOSException(map, "procedure", "InvalidParameterValue");
}
#endif /* defined(USE_WCS_SVR) && defined(USE_LIBXML2) */
@@ -2753,12 +2753,12 @@
xmlXPathFreeObject(psXPathTmp);
- /* check for SensorId */
- psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:DescribeSensor/sos:SensorId");
+ /* check for Procedure */
+ psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:DescribeSensor/sos:procedure");
if (psXPathTmp) {
nodeset = psXPathTmp->nodesetval;
- sosparams->pszSensorId = (char *)xmlNodeListGetString(doc, nodeset->nodeTab[0]->xmlChildrenNode, 1);
+ sosparams->pszProcedure = (char *)xmlNodeListGetString(doc, nodeset->nodeTab[0]->xmlChildrenNode, 1);
}
xmlXPathFreeObject(psXPathTmp);
More information about the mapserver-commits
mailing list