[Geoserver-devel] [jira] Created: (GEOS-842) Default feature properties (name/description/boundedBy) not supported in WFS GetFeature request

Default feature properties (name/description/boundedBy) not supported in WFS GetFeature request
-----------------------------------------------------------------------------------------------

                 Key: GEOS-842
                 URL: http://jira.codehaus.org/browse/GEOS-842
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.4.0
         Environment: Windows XP, using default Geoserver 1.4.0 binary setup
            Reporter: Frank Steggink
         Assigned To: Andrea Aime

My mail to the Geoserver-users list, with Chris Holmes' reply
Note that this problem can be replicated with any data source, not with the data source (shapefiles) I've used

I've installed Geoserver 1.4, and I would like to use it for WFS. I'm
having a problem when I do a GetFeature request where the default
properties of a gml:AbstractFeatureType are included (gml:name,
gml:description, gml:boundedBy). I'm getting a ServiceException with
the following message: "Requested property: name is not available for
cbs:wijk_2005_gen. The possible propertyName values are: <snip/>".

Since all feature types in Geoserver are derived from
gml:AbstractFeatureType (see
http://schemas.opengis.net/gml/2.1.2/feature.xsd), I expected that I
would get a list with requested feature, with null values (empty
elements) for the gml:name/gml:desc properties. (The gml:boundedBy
property could be calculated, and it will be returned when I check the
"Generate feature bounds" checkbox.)

Yes, I agree that such behavior is probably the best way to go. The name/desc/boundedBy stuff is a bit of a hack. If you turn citeConformanceHacks to true then it will properly bind any name/desc/boundedBy properties that already exist in your dataset with the proper GML prefix.

The solution we're waiting for is to allow people to do arbitrary mapping from their data to feature output, so they could specify what field in their database they want to show up as 'name' or 'description'.

But even with that, I think I agree that if a user does happen to request a gml:name or gml:desc then we should not be throwing an error.
  We should be returning empty elements.

My GetFeature request is (based on the WFS demo):

<wfs:GetFeature service="WFS" version="1.0.0"

  outputFormat="GML2"

  xmlns:topp="http://www.openplans.org/topp&quot;

  xmlns:wfs="http://www.opengis.net/wfs&quot;

  xmlns:ogc="http://www.opengis.net/ogc&quot;

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;

  xmlns:gml="http://www.opengis.net/gml&quot;

  xsi:schemaLocation="http://www.opengis.net/wfs

                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;

  maxFeatures="5">

  <wfs:Query typeName="cbs:wijk_2005_gen">

    <ogc:PropertyName>gml:name</ogc:PropertyName>

    <ogc:PropertyName>the_geom</ogc:PropertyName>

    <ogc:PropertyName>WK_CODE</ogc:PropertyName>

    <ogc:PropertyName>GM_CODE</ogc:PropertyName>

    <ogc:PropertyName>WK_NAAM</ogc:PropertyName>

    <ogc:PropertyName>GM_NAAM</ogc:PropertyName>

  </wfs:Query>

</wfs:GetFeature>

Note that I've included the xmlns:gml attribute, to include the gml
namespace. This doesn't make any difference. As soon as I omit the
property gml:name I'm getting a list of features. The same is true for
gml:description and gml:boundedBy.

Yes, that behavior makes sense with how it is coded. Could you submit a
but to our task tracker? See:
http://docs.codehaus.org/display/GEOSDOC/1+Reporting+Issues (you don't
need to do all the steps, just report what you've got as it's
sufficient, I can confirm it's a bug)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira