0

I do NOT want to use GetFeatureInfo as it is implemented using map click. I just want to get the columns list.

I tried

http://example.com/geoserver/wfs?
  service=wfs&
  version=2.0.0&
  request=DescribeFeatureType

but it did not worked for me.

5
  • 1
    please add what the error was, and explain what didn;t work exactly – Ian Turton Jun 10 '16 at 7:51
  • 2
    You can't get the columns listing from a standard WMS other than through a GetFeatureInfo request. If a WMS has an associated WFS, there is no guarentee that the WMS layer columns will match the WFS featuretype property names. – nmtoken Jun 23 '16 at 9:38
  • 1
    service=wfs& is incorrect according to the specification, it should be service=WFS&, but it is unlikely that this is the cause of your error. Otherwise the syntax is correct – nmtoken Sep 17 '16 at 19:23
  • @nmtoken : service=wfs (lowercase) is working. – Magno C Jan 13 '17 at 11:45
  • 1
    The WFS specification says the value MUST be WFS, so whilst it may work for you it is more correct to use the correct request syntax. – nmtoken Jan 13 '17 at 12:12
1

to get WFS featuretypes use this >

http://example.com/geoserver/wfs?version=1.3.0&request=describeFeatureType&outputFormat=application/json&service=WFS&typeName=layerName

I'm not sure about WMS.

2
  • 1
    Version number is incorrect in your URL (there's no WFS version 1.3.0), outputFormat is not required, you don't need to specify a feature type name, (you'll get all types) and request=DescribeFeatureType not describeFeatureType (value is case sensitive) – nmtoken Sep 17 '16 at 19:17
  • outputFormat may not be required but is very useful to change the response to JSON. +1 for that. – Magno C Jan 13 '17 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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