I'm using Geoserver in my web application. I need custom DescribeFeatureType response. What this mean?
layer_a is a layer in Geoserver. It have Feature Type Details as follow:

enter image description here

DiscribeFeatureType request for this layer, return a response as follow:

<?xml version="1.0" encoding="UTF-8"?>
  <xsd:schema xmlns:gml="http://www.opengis.net/gml" 
  <xsd:import namespace="http://www.opengis.net/gml" 

  <xsd:complexType name="WorldCountriesType">
      <xsd:extension base="gml:AbstractFeatureType">
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiSurfacePropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="ObjectID" nillable="true" type="xsd:int"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="FIPS_CNTRY" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="SQKM" nillable="true" type="xsd:double"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="SQMI" nillable="true" type="xsd:double"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="COLORMAP" nillable="true" type="xsd:int"/>
  <xsd:element name="WorldCountries" substitutionGroup="gml:_Feature" type="opengeo:WorldCountriesType"/>

I want to get more description for some fields. For example, for SQKM row, I want to get some extra description such as: minValue, maxValue and etc.

Is it possible? If yes, HOW?

A suggestion: We can put our data in column comment of table and then define a db datastore in geoserver. So we can response comment of table with describeFeatureType?

1 Answer 1


There is a limited possibility to adjust the schema by using the schema mapping as described in http://docs.geoserver.org/2.7.1/user/services/wfs/schemamapping.html. However, the following edit did not change anything in DescribeFeatureType and maxLength does not appear in the schema of of the topp:states layer even the edited schema.xsd was accepted and I verified by removing some attributes from the schema that the file was really used.

<xsd:element maxOccurs="1" minOccurs="0" name="STATE_NAME" nillable="true" type="xsd:string" maxLength="30"/>

There is also this open issue which suggests that what you want to do is not doable at the moment https://osgeo-org.atlassian.net/browse/GEOS-5336.

However, the application schema extension is flexible and it might work for you but it is complex http://docs.geoserver.org/stable/en/user/data/app-schema/index.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.