On lundi 2 juillet 2018 20:55:11 CEST Seth G wrote: > Hi all, > > A question on WFS GetFeature requests and the OUTPUTFORMAT type. > > All fields specified in gml_include_items are returned when creating non-GML > outputs such as Shapefile and GeoJSON even when setting the PROPERTYNAME > parameter in the request to reduce which fields should be added to the > output. The docs at > http://mapserver.org/output/ogr_output.html#layer-metadata note you can use > gml_include_items but makes no mention they can't be overridden with > PROPERTYNAME . > > As OUTPUT format is an extension to WFS > (http://mapserver.org/ogc/wfs_server.html#mapserver-wfs-extensions) is this > logic by design? > > Maybe a note should be added to > http://mapserver.org/ogc/wfs_server.html#to-do-items-and-known-limitations > ?
Seth, From a quick test, I don't see a difference in behaviour between OGR output and native GML one, based on msautotest wfs_ogr.map $ mapserv QUERY_STRING="map=wfs_ogr.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace&OUTPUTFORMAT=CSV&PROPERTYNAME=NAME&MAXFEATURES=1" Content-Disposition: attachment; filename=result.csv Content-Type: text/csv WKT,NAME "POINT (2281604.25 340848.9375)","""Tignish" $ mapserv QUERY_STRING="map=wfs_ogr.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace&PROPERTYNAME=NAME&MAXFEATURES=1" Content-Type: text/xml; subtype=gml/3.1.1; charset=UTF-8 <?xml version='1.0' encoding="UTF-8" ?> <wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http:// localhost/path/to/wfs_simple? SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=popplace&OUTPUTFORMAT=text/ xml;%20subtype=gml/3.1.1 http://www.opengis.net/wfs http:// schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <gml:boundedBy> <gml:Envelope srsName="EPSG:3978"> <gml:lowerCorner>2281604.250000 340848.937500</gml:lowerCorner> <gml:upperCorner>2281604.250000 340848.937500</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <gml:featureMember> <ms:popplace gml:id="popplace.BACMK"> <ms:NAME>"Tignish</ms:NAME> </ms:popplace> </gml:featureMember> </wfs:FeatureCollection> Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
