[Geoserver-devel] text/xml mime type for GetFeatureInfo

I need a way to get back all of a feature's attribute values in xml, without also getting the geometry. We found that we can do this by doing a GetFeatureInfo with width and height = 1 and x and y = 0. I saw that you can add a custom template to format the response as you'd like, but this seems to override the default responses (html, plain text, gml). Ideally, I'd like to be able to do the request with info_format=text/xml and keep all of the others the same. What would be the best way to do this? Should I create an XMLFeatureInfoResponse class and add it to GetFeatureInfoResponse? If there is no easier way, would this be something I should contribute back to GeoServer?

Thanks,
Ryan

Is it possible for you to use a WFS GetFeature request instead of WMS GetFeatureInfo? If so, you can specify a list of properties to include in the results (and tailor this list to exclude the geometry field). OpenLayers has a WFSGetFeature control (not sure if that is the name exactly) which can help with this.


David Winslow
OpenGeo - http://opengeo.org/

On Thu, Sep 16, 2010 at 6:13 PM, Ryan Zoerb <razoerb@anonymised.com> wrote:

I need a way to get back all of a feature’s attribute values in xml, without also getting the geometry. We found that we can do this by doing a GetFeatureInfo with width and height = 1 and x and y = 0. I saw that you can add a custom template to format the response as you’d like, but this seems to override the default responses (html, plain text, gml). Ideally, I’d like to be able to do the request with info_format=text/xml and keep all of the others the same. What would be the best way to do this? Should I create an XMLFeatureInfoResponse class and add it to GetFeatureInfoResponse? If there is no easier way, would this be something I should contribute back to GeoServer?

Thanks,
Ryan

Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel