[Geoserver-users] WFS returning only the bbox of the result

Hi,

This thread suggests that the only way to get only the bbox of features in a
WFS response, without the geometry, is to add custom code:
http://www.nabble.com/Best-way-to-implement-WFS-response-that-only-returns-the-bbox-of-the-result-td22284469.html#a22410724

Is that indeed the case? I'd like to check before I see if our GeoServer
support person can add such functionality. If it is indeed the case, what
needs to be done to set it up with GeoJSON as the output format?

Much thanks,
Tom
--
View this message in context: http://www.nabble.com/WFS-returning-only-the-bbox-of-the-result-tp24291563p24291563.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Tom,

Yes, I think the solution discussed in that thread still stands. Adding support for geojson is a bit tricky, because currently when resulttype == "hits", it is tied to gml output. So that need to be run through an extension point like when resulttype == "results". Which is not too much work. So I would say the major bits of the work would be:

1) Separate HitsOutputFormat into a GML3HitsOutputFormat and a GeoJSONOutputFormat
2) Modify HitsOutputFormat to check or the format option and grab the bounds accordingly
3) Implement the GeoJSONHitsOutputFormat

All in all not too much work, we are happy to provide further guidance as long as the work will be contributed back to the core.

-Justin

Tom B wrote:

Hi,

This thread suggests that the only way to get only the bbox of features in a
WFS response, without the geometry, is to add custom code:
http://www.nabble.com/Best-way-to-implement-WFS-response-that-only-returns-the-bbox-of-the-result-td22284469.html#a22410724

Is that indeed the case? I'd like to check before I see if our GeoServer
support person can add such functionality. If it is indeed the case, what
needs to be done to set it up with GeoJSON as the output format?

Much thanks,
Tom

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.