#675 closed enhancement (fixed)
Mapserver WFS ignores PropertyName outside Filter
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.
Attachments (3)
Change History (20)
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 , 17 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.
comment:9 by , 16 years ago
I am working on a patch for this issue. Hopefully I can cook up something soon.
by , 16 years ago
Attachment: | mapserver-5.2.0-675.patch added |
---|
comment:10 by , 16 years ago
Milestone: | FUTURE → 5.4 release |
---|
comment:11 by , 15 years ago
Status: | new → assigned |
---|
Bart,
Are the patch submitted in this bug complete? I seem to only see modifications done in mapows.h.
I am going to work on this bug (support of PropertyName and also the possibility to execlude geometries from the result) I am also wondering if the the geometry exclusion would be better done using a specific tag like gml_exclude_geometry.
Thx
comment:12 by , 15 years ago
Hey Assefa, it is complete, but Trac only shows the first file. Please download the patch instead in its original format [1]
[1] http://trac.osgeo.org/mapserver/attachment/ticket/675/mapserver-5.2.0-675.patch
I think we need to decide on how METADATA relates to the WFS protocol definition, I think the WFS protocol should always override METADATA.
comment:13 by , 15 years ago
I just found out this patch currently does not incorporate alias fields.
by , 15 years ago
Attachment: | mapserver-5.2.0-675.2.patch added |
---|
new patch incorporating alias fields
comment:14 by , 15 years ago
Milestone: | 5.4 release → 6.0 release |
---|
comment:15 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
committed in trunk. Added msautotest
comment:16 by , 14 years ago
Milestone: | 6.0 release → 5.6 release |
---|
(Changing target milestone since trunk is currently 5.6)