change in WFS DescribeFeatureType response (MS 4.6)

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Sep 22 12:25:08 EDT 2005


The reasoning is that you need some sort of a default behavior if the user doesn't
specify a more specific container so the decision was made to specify the most
generic containter possible. This is consistent with how a couple of the commercial
vendors concentrating just on OWS work as well. It's not easy to truely identify
a specific type (e.g. polygon vs. multipolygon) from the data without looping 
through the search results (not a good option) since MapServer doesn't differentiate
between single and multi part features with the TYPE parameter. You could write
all features as multipart GML elements but that's not good either- you need more
control.

So, of course you have the option to override this behavior via metadata. You can
explicitly set the geometry type (or even types) to be output.

E.g.

  gml_geometries "stations" # define the geometries possible with this layer
  gml_stations_type "multipoint"  # define the type for "stations"

or

  gml_geomtries "station"
  gml_station_type "point"
  gml_station_occurances "0,UNBOUNDED"

Both of these are valid for a multipoint data set. The first would output a schema fragment
like:

[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element name="stations" type="gml:multipointPropertyType" minOccurs="0"
maxOccurs="1"/>
[...]

and the second:

[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element name="station" type="gml:pointPropertyType" minOccurs="0"
maxOccurs="UNBOUNDED"/>
[...]

The GML output for the 1st would consist of a single multipoint feature and the 2nd
would give you a series of point features. You need this type of flexibility when dealing
with 3rd party application schema...

Steve  

>>> Bart van den Eijnden <bartvde at XS4ALL.NL> 09/20/05 1:36 PM >>>
Hi list,

probably a question for Steve L., in Mapserver 4.4 the WFS 
DescribeFeatureType response returned the geometry type of the typename, 
so eg gml:polygonProperty. Mapserver 4.6 always returns the more 
abstract gml:GeometryPropertyType.

What is the reasoning behind this?

There is some client functionality dependent on the geometry type, e.g. 
for styling a WMS layer using SLD. If you know the geometry type, you 
can determine which type of symbolizer you need.

Mapserver 4.6:

[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0"
maxOccurs="1"/>
[...]


Mapserver 4.4:

[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element ref="gml:polygonProperty" minOccurs="0"/>
[...]


Best regards,
Bart



More information about the mapserver-dev mailing list