[Geoserver-devel] Using GeoTools to Parse DescribeFeature results

On behalf of my colleague, who’s developing a WFS client using GeoTools:

Greetings,

I have been building the client side of a Java WFS application using GeoTools and I’m a little stuck implementing the DescribeFeature option. Once I get a response from the server, I’m lost as to how to translate the XML text into a SimpleFeatureType or other usable object.

The first thing I tried was to create a WFS_1_1_0_DataStore and use its getSchema(String typeName) method and that works most of the time, but does not seem to work well for certain servers.

So I implemented my own query and it successfully gets an appropriate XML response from the server, but there doesn’t seem to be a convenient way to parse the text into something usable.

What I’m looking for is something like this (http://www.mail-archive.com/users@anonymised.com/msg14988.html), which I found while researching but is, unfortunately, written in JavaScript. Does GeoTools have any such functionality?

Thank you.

Regards,
Phony

You probably want to ask on the geotools list.
(the code to parse describe feature results is inside the wfsdatastore)

Jody

On 06/11/2010, at 5:01 AM, phony baloney wrote:

On behalf of my colleague, who’s developing a WFS client using GeoTools:

Greetings,

I have been building the client side of a Java WFS application using GeoTools and I’m a little stuck implementing the DescribeFeature option. Once I get a response from the server, I’m lost as to how to translate the XML text into a SimpleFeatureType or other usable object.

The first thing I tried was to create a WFS_1_1_0_DataStore and use its getSchema(String typeName) method and that works most of the time, but does not seem to work well for certain servers.

So I implemented my own query and it successfully gets an appropriate XML response from the server, but there doesn’t seem to be a convenient way to parse the text into something usable.

What I’m looking for is something like this (http://www.mail-archive.com/users@anonymised.com/msg14988.html), which I found while researching but is, unfortunately, written in JavaScript. Does GeoTools have any such functionality?

Thank you.

Regards,
Phony


The Next 800 Companies to Lead America’s Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book “Blueprint to a
Billion” shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel