Opened 20 years ago
Last modified 14 years ago
#675 closed enhancement
Mapserver WFS ignores PropertyName outside Filter — at Version 7
Reported by: | Owned by: | assefa | |
---|---|---|---|
Priority: | high | Milestone: | 5.6 release |
Component: | WFS Server | Version: | 4.2 |
Severity: | minor | Keywords: | |
Cc: | mapserver@… |
Description (last modified by )
When a performing a GetFeature like the following: <GetFeature service="WFS" version="1.0.0" maxFeatures="20" xmlns="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0 WFS-basic.xsd"> <Query typeName="Gemeentes"> <PropertyName>GEMCODE</PropertyName> <ogc:Filter> <ogc:BBOX> <PropertyName>MS_GEOMETRY</PropertyName> <gml:Box><gml:coordinates>121000,469000 140000,470000</gml:coordinates></gml:Box> </ogc:BBOX> </ogc:Filter> </Query> </GetFeature> Mapserver should return only the GEMCODE attribute, it returns the full set. This is what the WFS 1.0 spec says about the behaviour: The <PropertyName> element is used to enumerate the feature properties that should be selected during a query and whose values should be included in the response to a GetFeature request. A client application can determine the properties of a feature by making a DescribeFeatureType request before composing a GetFeature request. The DescribeFeatureType operation [sec. 8] will generate a GML application schema defining the schema of the feature type. The client can then select the properties to be fetched. In addition, the client can determine which feature properties are mandatory and must be fetched in order for the WFS to be able to generate an instance of the feature type that will validate againt the generated GML application schema. In the event that a WFS encounters a query that does not select all mandatory properties of a feature, the WFS will internally augment the property name list to include all necessary property names. A WFS client must thus be prepared to deal with a situation where it receives more property values than it requests. If no <PropertyName> elements are specified, then all feature properties should be fetched.
Change History (7)
comment:2 by , 19 years ago
The same applies to the HTTP GET interface. E.g.: http://www.someserver.com/wfs.cgi&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&PROPERTYNAME=INWATERA_1M/WKB_GEOM,INWATERA_1M/TILE_ID&TYPENAME=INWATERA_1M
comment:3 by , 19 years ago
Cc: | added |
---|
comment:4 by , 18 years ago
I'm going to vote for this :) Also I don't know if the spec says anything specific about this, but it'd be nice if the geometry could also be treated equally. In my use case, I'm interested only in the bounding box of a feature, so I could suppress everything else easily. And considering how the actualy geometry can easily be biggest component of a FeatureMember, this could help improve performance quite a bit. I wonder if I can gml_exclude "msGeometry"?? I'm going to go try that, it not, that'd be nice too :)
comment:5 by , 18 years ago
Assefa, how much work would be involved in this? Also, could it be possible to only query the database for the columns needed?
comment:6 by , 18 years ago
Milestone: | FUTURE → 5.0 release |
---|
comment:7 by , 17 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
Reassigned to Assefa. Please update status and/or milestone.
Note:
See TracTickets
for help on using tickets.