[mapserver-commits] r7271 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Jan 17 14:48:56 EST 2008


Author: tomkralidis
Date: 2008-01-17 14:48:56 -0500 (Thu, 17 Jan 2008)
New Revision: 7271

Modified:
   trunk/mapserver/mapogcfilter.c
   trunk/mapserver/mapogcfilter.h
Log:
update FLTGetCapabilities according to 1.1.0 (#2111)


Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c	2008-01-17 07:21:36 UTC (rev 7270)
+++ trunk/mapserver/mapogcfilter.c	2008-01-17 19:48:56 UTC (rev 7271)
@@ -3804,35 +3804,68 @@
 }
 #ifdef USE_LIBXML2
 
-xmlNodePtr FLTGetCapabilities(xmlNsPtr psNsOgc)
+xmlNodePtr FLTGetCapabilities(xmlNsPtr psNsParent, xmlNsPtr psNsOgc)
 {
-    xmlNodePtr   psRootNode = NULL, psNode = NULL;
+    xmlNodePtr psRootNode = NULL, psNode = NULL, psSubNode = NULL, psSubSubNode = NULL;
     
-    //psRootNode = xmlNewNode(xmlNewNs(psRootNode, BAD_CAST MS_OWSCOMMON_OGC_NAMESPACE_URI, BAD_CAST MS_OWSCOMMON_OGC_NAMESPACE_PREFIX), BAD_CAST "Filter_Capabilities");
-    psRootNode = xmlNewNode(psNsOgc, BAD_CAST "Filter_Capabilities");
+    psRootNode = xmlNewNode(psNsParent, BAD_CAST "Filter_Capabilities");
     
     psNode = xmlNewChild(psRootNode, psNsOgc, BAD_CAST "Spatial_Capabilities", NULL);
-    psNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "Spatial_Operators", NULL);
+
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "GeometryOperands", NULL);
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "GeometryOperand", BAD_CAST "gml:Point");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "GeometryOperand", BAD_CAST "gml:LineString");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "GeometryOperand", BAD_CAST "gml:Polygon");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "GeometryOperand", BAD_CAST "gml:Envelope");
+
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "SpatialOperators", NULL);
 #ifdef USE_GEOS
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Equals", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Disjoint", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Touches", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Within", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Overlaps", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Crosses", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Intersect", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Contains", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "DWithin", NULL);
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Equals");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Disjoint");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Touches");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Within");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Overlaps");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Crosses");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Intersects");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "Contains");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "DWithin");
 #endif
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "BBOX", NULL);
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "SpatialOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "BBOX");
 
+    psNode = xmlNewChild(psRootNode, psNsOgc, BAD_CAST "Temporal_Capabilities", NULL);
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "TemporalOperands", NULL);
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "TemporalOperand", BAD_CAST "gml:TimePeriod");
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "TemporalOperand", BAD_CAST "gml:TimeInstant");
+
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "TemporalOperators", NULL);
+    psSubSubNode = xmlNewChild(psSubNode, psNsOgc, BAD_CAST "TemporalOperator", NULL);
+    xmlNewProp(psSubSubNode, BAD_CAST "name", BAD_CAST "TM_Equals");
+
     psNode = xmlNewChild(psRootNode, psNsOgc, BAD_CAST "Scalar_Capabilities", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Logical_Operators", NULL);
-    psNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "Comparison_Operators", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Simple_Comparisons", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Like", NULL);
-    xmlNewChild(psNode, psNsOgc, BAD_CAST "Between", NULL);
+    xmlNewChild(psNode, psNsOgc, BAD_CAST "LogicalOperators", NULL);
+    psNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperators", NULL);
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "LessThan");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "GreaterThan");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "LessThanEqualTo");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "GreaterThanEqualTo");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "EqualTo");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "NotEqualTo");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "Like");
+    psSubNode = xmlNewChild(psNode, psNsOgc, BAD_CAST "ComparisonOperator", BAD_CAST "Between");
     
+    psNode = xmlNewChild(psRootNode, psNsOgc, BAD_CAST "Id_Capabilities", NULL);
+    xmlNewChild(psNode, psNsOgc, BAD_CAST "FID", NULL);
+
     return psRootNode;
 }
 #endif

Modified: trunk/mapserver/mapogcfilter.h
===================================================================
--- trunk/mapserver/mapogcfilter.h	2008-01-17 07:21:36 UTC (rev 7270)
+++ trunk/mapserver/mapogcfilter.h	2008-01-17 19:48:56 UTC (rev 7271)
@@ -122,7 +122,7 @@
 MS_DLL_EXPORT FilterEncodingNode *FLTCreateFeatureIdFilterEncoding(char *pszString);
 
 #ifdef USE_LIBXML2
-MS_DLL_EXPORT xmlNodePtr FLTGetCapabilities(xmlNsPtr psNsOgc);
+MS_DLL_EXPORT xmlNodePtr FLTGetCapabilities(xmlNsPtr psNsParent, xmlNsPtr psNsOgc);
 #endif
 
 #endif



More information about the mapserver-commits mailing list