Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a declarative way to set / shortcut declare the extent or bounds of a feature's geometry #256

Open
prushforth opened this issue Apr 19, 2024 · 0 comments

Comments

@prushforth
Copy link
Member

When using the GeoServer "pre-generalized features" module, or eventually when querying an SLD-enabled LayerGroup (StyleGroup) that returns scale-appropriate features via both the GetMap and GetFeatureInfo interfaces, it's a necessity to clip the returned feature to the bbox that is provided in the request.

The reason is simple: when zoomed way in (large scale) on a very large feature (e.g. Canada's North West Territories, or Nunavut), returning the entire feature in response to a query is prohibitively slow due to the high resolution of data. In such a case the feature should be clipped on the server side to the bbox that is provided by the query , so that the feature response is a) of manageable size, and b) relevant the the request.

This is already done by the WMS GetMap processing in GeoServer >= 2.26, however we are planning to make it a reality in the WMS GetFeatureInfo processing in an upcoming release.

This raises another issue, however, which is: how can the client establish the bounds of the feature, which underlies the "Zoom to here" link in feature popups, if only a clipped portion of the feature is available to establish the bounds to which to zoom.

The issue is compounded in the WMTS GetFeatureInfo interface, in which only the bounds of the tile itself are declared by the query (implicitly, at least via the tile's {z}/{x}/{y} parameters - the tile bounds can be calculated from the tile coordinates). Returning the tile bounds as representing the feature geometry would look odd and not be visually meaningful (square feature), nor would it be practically useful for zooming or any other function. It might be possible to put WMTS GetFeatureInfo on the same footing as WMS GetFeatureInfo by adding a MapML format-specific bbox parameter to the query link which would return the clipped feature. That puts WMTS GetFeatureInfo on the same foot as WMS: a query returns a partial feature that is not much use for establishing the actual bounds of the feature, nor useful as a basis for the "Zoom to here" function.

A solution might be to add an optional bbox attribute to the <map-geometry> that would set the bounds of the feature without having to a) go through all the feature's coordinates and b) be sometimes available when the entire feature was not present inside the map for calculation. The bbox attribute would be expected to be xmin,ymin,xmax,ymax in the same coordinate system as the coordinates of the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant