Bug 1152 - [Chameleon] ExpressionBuilder does not work with MapServer 4.6
: [Chameleon] ExpressionBuilder does not work with MapServer 4.6
Status: RESOLVED FIXED
: Chameleon
Widget
: 2.2
: PC Linux
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-09-19 14:46 by
Modified: 2006-03-07 02:45 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-09-19 14:46:46
It seems that the ExpressionBuilder widget does not work with MapServer 4.6 and
up. The widget assume that the layer type is define in a DescribeFeatureType
request to the WFS server. Before 4.6 we this request returned something like this:
[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element ref="gml:polygonProperty" minOccurs="0"/>
[...]

From 4.6 The type (gml:polygonProperty) is not present anymore. This cause the
ExpressionBuilder widget to not be able to fetch the SLD document and not
drawing the layer on the map (and cause an error). 

The 4.6 response looks like this:
[...]
<complexContent>
  <extension base="gml:AbstractFeatureType">
    <sequence>
      <element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0"
maxOccurs="1"/>
[...]
------- Comment #1 From 2005-09-20 14:13:30 -------
Added myself to the cc.

Julien, maybe we should ask on the mapserver-dev list why Steve removed the
geometry type from the DescribeLayer response?
------- Comment #2 From 2005-09-28 09:18:35 -------
The reply from Steve Lime:

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  
------- Comment #3 From 2005-12-27 10:31:16 -------
I've tested this out and it works fine this way. There is only 1 problem, the
list of attributes shows the geometry property which should not be the case.
I'll open up a separate bug for that.

I've used:

  gml_geometries "provincies"
  gml_provincies_type "multipolygon"
  gml_include_items "all"
------- Comment #4 From 2006-03-07 02:45:01 -------
I have verified this one again. Setting as FIXED.