[Geoserver-users] DescribeFeatureType weirdness

Hi All,

Is there anything special about the words “description” and “location”?

When I do a DescribeFeatureType usig WFS version 1.1.0 on GeoServer 1.6.4 I don’t get all the elements returned. If I use version 1.0.0 or GeoSever 1.7 I get the expected results.

GeoServer 1.6.4 output:

<xsd:complexType name=“pete_testType”>
xsd:complexContent
<xsd:extension base=“gml:AbstractFeatureType”>
xsd:sequence
<xsd:element maxOccurs=“1” minOccurs=“0” name=“the_geom” nillable=“true” type=“gml:PointPropertyType”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“site_name” nillable=“true” type=“xsd:string”/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name=“pete_test” substitutionGroup=“gml:_Feature” type=“topp:pete_testType”/>
</xsd:schema>

GeoServer 1.7 output:

<xsd:complexType name=“pete_testType”>
xsd:complexContent
<xsd:extension base=“gml:AbstractFeatureType”>
xsd:sequence
<xsd:element maxOccurs=“1” minOccurs=“0” name=“the_geom” nillable=“true” type=“gml:PointPropertyType”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“site_name” nillable=“true” type=“xsd:string”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“description” nillable=“true” type=“xsd:string”/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name=“pete_test” substitutionGroup=“gml:_Feature” type=“topp:pete_testType”/>
</xsd:schema>

Both GeoServers are newly created and running against the same PostGIS database view. GetFeature returns all elements. If I change the name of the column to another word then everything works fine.

Cheers,

Pete


Plymouth Marine Laboratory
Prospect Place
Plymouth
PL1 3DH

Website: www.pml.ac.uk
Registered Charity No. 1091222
Company No. 4178503

PML is a member of the Plymouth Marine Sciences Partnership
Website: www.pmsp.org.uk

Please think before you print.


This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo@anonymised.com and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.


Peter Walker ha scritto:

Hi All,
Is there anything special about the words "description" and "location"?

Yes, they are part of the gml:Feature schema, so they are already
there somehow... but in a different namespace.

When I do a DescribeFeatureType usig WFS version 1.1.0 on GeoServer 1.6.4 I don't get all the elements returned. If I use version 1.0.0 or GeoSever 1.7 I get the expected results.
GeoServer 1.6.4 output:

  <xsd:complexType name="pete_testType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:PointPropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="site_name" nillable="true" type="xsd:string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="pete_test" substitutionGroup="gml:_Feature" type="topp:pete_testType"/>
</xsd:schema>
GeoServer 1.7 output:

  <xsd:complexType name="pete_testType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:PointPropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="site_name" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="description" nillable="true" type="xsd:string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="pete_test" substitutionGroup="gml:_Feature" type="topp:pete_testType"/>
</xsd:schema>
Both GeoServers are newly created and running against the same PostGIS database view. GetFeature returns all elements. If I change the name of the column to another word then everything works fine.

We changed the handling of those two in 1.7.0, but the patch
wasn't back ported. Justin, cc'ed, can provide more details.

Cheers
Andrea

Hi Peter,

I think this is the expected behavior. If you do a 1.1 request with 1.7 you should see the same behavior as a 1.1 request with 1.6.

The reason being that with wfs 1.1 / gml 3 the elements "location" and "description" are "baked into" gml:AbstractFeatureType and gml:AbstractGMLType, the types from which every feature type extends.

Whenever you have a dataset (shapefile,db table,etc...) which has a column with one of those names GeoServer maps it to the elements in the gml namespace (in a 1.1 request).

The upshot is that you wont see them in a 1.1 describe feature request, and they will show up as gml:location and gml:description in a 1.1 getfeature request. In a 1.0 getfeature request they should show up in the application schema namespace rather than gml.

I hope that makes sense. Let me know if anything is still unclear.

-Justin

Peter Walker wrote:

Hi All,
Is there anything special about the words "description" and "location"?
When I do a DescribeFeatureType usig WFS version 1.1.0 on GeoServer 1.6.4 I don't get all the elements returned. If I use version 1.0.0 or GeoSever 1.7 I get the expected results.
GeoServer 1.6.4 output:

  <xsd:complexType name="pete_testType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:PointPropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="site_name" nillable="true" type="xsd:string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="pete_test" substitutionGroup="gml:_Feature" type="topp:pete_testType"/>
</xsd:schema>
GeoServer 1.7 output:

  <xsd:complexType name="pete_testType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:PointPropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="site_name" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="description" nillable="true" type="xsd:string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="pete_test" substitutionGroup="gml:_Feature" type="topp:pete_testType"/>
</xsd:schema>
Both GeoServers are newly created and running against the same PostGIS database view. GetFeature returns all elements. If I change the name of the column to another word then everything works fine.
Cheers,
Pete

------------------------------------------------------------------------

Plymouth Marine Laboratory
Prospect Place
Plymouth
PL1 3DH

Website: www.pml.ac.uk <http://www.pml.ac.uk>
Registered Charity No. 1091222
Company No. 4178503

PML is a member of the Plymouth Marine Sciences Partnership
Website: www.pmsp.org.uk <http://www.pmsp.org.uk>

Please think before you print.

------------------------------------------------------------------------

This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo@anonymised.com and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.

------------------------------------------------------------------------

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com