[mapserver-commits] r9848 - in trunk: mapserver msautotest/wxs
msautotest/wxs/expected
svn at osgeo.org
svn at osgeo.org
Sun Feb 21 15:43:59 EST 2010
Author: tomkralidis
Date: 2010-02-21 15:43:58 -0500 (Sun, 21 Feb 2010)
New Revision: 9848
Added:
trunk/msautotest/wxs/expected/wfs11_get_feature_id_gml2.xml
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwfs.c
trunk/msautotest/wxs/expected/wfs11_get_feature.xml
trunk/msautotest/wxs/expected/wfs11_get_feature_hits.xml
trunk/msautotest/wxs/expected/wfs11_get_feature_id.xml
trunk/msautotest/wxs/expected/wfs11_get_feature_maxfeatures.xml
trunk/msautotest/wxs/expected/wfs11_get_feature_srsname.xml
trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml
trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml
trunk/msautotest/wxs/wfs_simple.map
Log:
support corrent MIME type output for WFS 1.1.0 (#3295)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/mapserver/HISTORY.TXT 2010-02-21 20:43:58 UTC (rev 9848)
@@ -14,6 +14,8 @@
Current Version (SVN trunk):
----------------------------
+- support corrent MIME type output for WFS 1.1.0 (#3295)
+
- add WMS 1.3.0 LayerLimit support (#3284)
- fix WFS 1.1.0 exception attributes (#3301)
Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/mapserver/mapwfs.c 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1034,6 +1034,7 @@
const char *tmpmaxfeatures = NULL;
const char *output_schema_format = "XMLSCHEMA";
+ const char *output_mime_type = "text/xml; subtype=gml/3.1.1";
int outputformat = OWS_GML2; /* default output is GML 2.1 */
char **aFIDLayers = NULL;
@@ -1341,15 +1342,18 @@
/* Validate outputformat */
if (paramsObj->pszOutputFormat) {
/* We support only GML2 and GML3 for now. */
- if(strcasecmp(paramsObj->pszOutputFormat, "GML2") == 0) {
+ if(strcasecmp(paramsObj->pszOutputFormat, "GML2") == 0 || strcasecmp(paramsObj->pszOutputFormat, "text/xml; subtype=gml/2.1.2") == 0) {
outputformat = OWS_GML2;
output_schema_format = "XMLSCHEMA";
- } else if(strcasecmp(paramsObj->pszOutputFormat, "GML3") == 0) {
+ output_mime_type = "text/xml; subtype=gml/2.1.2";
+ } else if(strcasecmp(paramsObj->pszOutputFormat, "GML3") == 0 || strcasecmp(paramsObj->pszOutputFormat, "text/xml; subtype=gml/3.1.1") == 0) {
outputformat = OWS_GML3;
output_schema_format = "SFE_XMLSCHEMA";
+ output_mime_type = "text/xml; subtype=gml/3.1.1";
} else {
outputformat = OWS_GML2;
output_schema_format = "XMLSCHEMA";
+ output_mime_type = "text/xml; subtype=gml/2.1.2";
}
}
else
@@ -1359,8 +1363,14 @@
{
outputformat = OWS_GML3;
output_schema_format = "text/xml; subtype=gml/3.1.1";
+ output_mime_type = "text/xml; subtype=gml/3.1.1";
}
}
+
+ if(strncmp(paramsObj->pszVersion,"1.0",3) == 0 ) {
+ output_mime_type = "text/xml";
+ }
+
/* else if (strcasecmp(names[i], "PROPERTYNAME") == 0) */
/* { */
/* */
@@ -1861,9 +1871,9 @@
value = msOWSLookupMetadata(&(map->web.metadata), "FO", "encoding");
if (value)
- msIO_printf("Content-type: text/xml; charset=%s%c%c", value,10,10);
+ msIO_printf("Content-type: %s; charset=%s%c%c", output_mime_type, value,10,10);
else
- msIO_printf("Content-type: text/xml%c%c",10,10);
+ msIO_printf("Content-type: %s%c%c", output_mime_type,10,10);
msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "FO",
"encoding", OWS_NOERR,
Modified: trunk/msautotest/wxs/expected/wfs11_get_feature.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/expected/wfs11_get_feature_hits.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature_hits.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature_hits.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/expected/wfs11_get_feature_id.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature_id.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature_id.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Added: trunk/msautotest/wxs/expected/wfs11_get_feature_id_gml2.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature_id_gml2.xml (rev 0)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature_id_gml2.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -0,0 +1,90 @@
+Content-type: text/xml; subtype=gml/2.1.2
+
+<?xml version='1.0' encoding="ISO-8859-1" ?>
+<wfs:FeatureCollection
+ xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
+ xmlns:wfs="http://www.opengis.net/wfs"
+ xmlns:gml="http://www.opengis.net/gml"
+ xmlns:ogc="http://www.opengis.net/ogc"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-basic.xsd
+ http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=province&OUTPUTFORMAT=XMLSCHEMA">
+ <gml:boundedBy>
+ <gml:Box srsName="EPSG:4326">
+ <gml:coordinates>-62.076968,47.191069 -61.433227,47.796447</gml:coordinates>
+ </gml:Box>
+ </gml:boundedBy>
+ <gml:featureMember>
+ <ms:province fid="province.Quebec">
+ <gml:boundedBy>
+ <gml:Box srsName="EPSG:4326">
+ <gml:coordinates>-61.510511,47.767892 -61.457648,47.796447</gml:coordinates>
+ </gml:Box>
+ </gml:boundedBy>
+ <ms:msGeometry>
+ <gml:Polygon srsName="EPSG:4326">
+ <gml:outerBoundaryIs>
+ <gml:LinearRing>
+ <gml:coordinates>-61.510511,47.774240 -61.508947,47.788606 -61.492725,47.796447 -61.457648,47.787438 -61.459987,47.767892 -61.483502,47.769615 -61.510511,47.774240 </gml:coordinates>
+ </gml:LinearRing>
+ </gml:outerBoundaryIs>
+ </gml:Polygon>
+ </ms:msGeometry>
+ </ms:province>
+ </gml:featureMember>
+ <gml:featureMember>
+ <ms:province fid="province.Quebec">
+ <gml:boundedBy>
+ <gml:Box srsName="EPSG:4326">
+ <gml:coordinates>-62.076968,47.191069 -61.433227,47.627593</gml:coordinates>
+ </gml:Box>
+ </gml:boundedBy>
+ <ms:msGeometry>
+ <gml:Polygon srsName="EPSG:4326">
+ <gml:outerBoundaryIs>
+ <gml:LinearRing>
+ <gml:coordinates>-62.010515,47.241088 -61.966742,47.246040 -61.947548,47.238311 -61.932708,47.228257 -61.906997,47.222202 -61.864694,47.233116 -61.842210,47.242674 -61.828736,47.238572 -61.828048,47.227311 -61.838414,47.215824 -61.895286,47.191069 -61.910866,47.195878 -61.930279,47.207300 -61.943690,47.211466 -61.980541,47.200682 -62.009180,47.202105 -62.057130,47.211273 -62.073040,47.219864 -62.076968,47.230193 -62.025236,47.300625 -62.012584,47.327971 -62.014128,47.354223 -62.001451,47.381572 -61.974280,47.406325 -61.875844,47.460730 -61.744027,47.556462 -61.659750,47.596818 -61.589874,47.619458 -61.532104,47.620068 -61.492444,47.626271 -61.467016,47.627593 -61.443646,47.625790 -61.433227,47.617067 -61.440203,47.602653 -61.482632,47.584451 -61.501965,47.571983 -61.527322,47.546702 -61.554237,47.531009 -61.580413,47.524411 -61.602124,47.536685 -61.592755,47.546644 -61.553676,47.564103 -61.540355,47.583872 -61.575318,47.596569 -61.628933,47.581754 -61.673230,47.560421 -61.707530,47.537886 -61.771983,47.502438 -61.811839,47.463236 -61.843632,47.439850 -61.867341,47.428764 -61.888445,47.413176 -61.910824,47.379589 -61.919309,47.354617 -61.918598,47.343351 -61.947480,47.328320 -61.983069,47.315363 -62.021449,47.257309 -62.010515,47.241088 </gml:coordinates>
+ </gml:LinearRing>
+ </gml:outerBoundaryIs>
+ </gml:Polygon>
+ </ms:msGeometry>
+ </ms:province>
+ </gml:featureMember>
+ <gml:featureMember>
+ <ms:province fid="province.Quebec">
+ <gml:boundedBy>
+ <gml:Box srsName="EPSG:4326">
+ <gml:coordinates>-61.850201,47.375784 -61.624632,47.535418</gml:coordinates>
+ </gml:Box>
+ </gml:boundedBy>
+ <ms:msGeometry>
+ <gml:Polygon srsName="EPSG:4326">
+ <gml:outerBoundaryIs>
+ <gml:LinearRing>
+ <gml:coordinates>-61.850201,47.390774 -61.837726,47.405273 -61.816375,47.417160 -61.802704,47.429451 -61.779258,47.444334 -61.759440,47.465873 -61.730626,47.484545 -61.704819,47.498723 -61.666427,47.527379 -61.644700,47.535418 -61.624632,47.532866 -61.631801,47.522259 -61.655676,47.511145 -61.729072,47.458309 -61.753441,47.438230 -61.776498,47.415897 -61.803218,47.379975 -61.819462,47.375784 -61.850201,47.390774 </gml:coordinates>
+ </gml:LinearRing>
+ </gml:outerBoundaryIs>
+ </gml:Polygon>
+ </ms:msGeometry>
+ </ms:province>
+ </gml:featureMember>
+ <gml:featureMember>
+ <ms:province fid="province.Quebec">
+ <gml:boundedBy>
+ <gml:Box srsName="EPSG:4326">
+ <gml:coordinates>-61.750964,47.255073 -61.719830,47.282116</gml:coordinates>
+ </gml:Box>
+ </gml:boundedBy>
+ <ms:msGeometry>
+ <gml:Polygon srsName="EPSG:4326">
+ <gml:outerBoundaryIs>
+ <gml:LinearRing>
+ <gml:coordinates>-61.748897,47.258394 -61.750964,47.275550 -61.730322,47.282116 -61.719830,47.269593 -61.732191,47.255073 -61.748897,47.258394 </gml:coordinates>
+ </gml:LinearRing>
+ </gml:outerBoundaryIs>
+ </gml:Polygon>
+ </ms:msGeometry>
+ </ms:province>
+ </gml:featureMember>
+</wfs:FeatureCollection>
+
Modified: trunk/msautotest/wxs/expected/wfs11_get_feature_maxfeatures.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature_maxfeatures.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature_maxfeatures.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/expected/wfs11_get_feature_srsname.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs11_get_feature_srsname.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs11_get_feature_srsname.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames1.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml
===================================================================
--- trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/expected/wfs_getfeature_twotypenames2.xml 2010-02-21 20:43:58 UTC (rev 9848)
@@ -1,4 +1,4 @@
-Content-type: text/xml
+Content-type: text/xml; subtype=gml/3.1.1
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
Modified: trunk/msautotest/wxs/wfs_simple.map
===================================================================
--- trunk/msautotest/wxs/wfs_simple.map 2010-02-21 19:03:17 UTC (rev 9847)
+++ trunk/msautotest/wxs/wfs_simple.map 2010-02-21 20:43:58 UTC (rev 9848)
@@ -58,6 +58,9 @@
# Get Feature by id
# RUN_PARMS: wfs11_get_feature_id.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=province&featureid=province.Quebec" > [RESULT]
#
+# Get Feature by id GML2
+# RUN_PARMS: wfs11_get_feature_id_gml2.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=province&featureid=province.Quebec&outputformat=text/xml; subtype=gml/2.1.2" > [RESULT]
+#
# GetFeature resultType=hits
#
# RUN_PARMS: wfs11_get_feature_hits.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=province&resulttype=hits" > [RESULT]
More information about the mapserver-commits
mailing list