Open prushforth opened 7 months ago
When mixing rasters and vectors in the same output, we need a TiledCRS to locate where the tiles are.
If we don't have a TiledCRS, then we need to skip the imagery layer. If we have a TiledCRS and the request is not tiled anyways, we'll have to generate enough map-tiles
references to cover the entire area.
It's going to be quite likely to have a mapmlfeatures and mapmlusefeatures be used by mistake in each other place.
How about a mapmlbody option with two possible values: layers
and flat
instead?
How about a mapmlbody option with two possible values: layers and flat instead?
mapmlfeatures
already exists, so I was / am hesitant about changing anything in how it works. Are you suggesting that mapmlbody
would have the same meaning as mapmlusefeatures
, OR would it replace both mapmlusefeatures
and mapmlfeatures
, or something else? I'm unsure how that would work, need to think about it more. Currently, mapmlfeatures
only appears in templated URLs generated in the tref
attribute. mapmlusefeatures
is a flag controlling the 'inner node' document. If mapmlbody
does something related to mapmlusefeatures
, I will have to re-write the table in the first details over here
Background
A LayerGroup in GeoServer is composed of one or more Layer or LayerGroup objects, ordered from bottom to top of the rendering stack i.e. in painter's model order. Because a LayerGroup is a composition of layers, per the previous statement, it's possible that there are many levels of nesting within a LayerGroup's definition. Despite this nesting, at the end of processing a WMS GetMap or GetFeatureInfo for such a layer, it must be de-nested into a linear set of layers to be rendered, each one on top of all the previous layers, in the painter's model.
A MapML document that requests the above result as a bitmapped image doesn't have to concern itself with the recursive rendering of the component layers, it only has to render the bitmapped image. On the other hand, if the de-nested layers were rendered as ordered sets of \ vectors and \ elements, it would be possible to render that content on the \ client or in the MapML preview.
Currently in GeoServer, a GetMap for
format=text/mapml
can indeed support a request for one or more layer groups among the layers that are requested via thelayers=layer1,layer2,layer3
parameter i.e. any one or all oflayer1
,layer2
orlayer3
can be a LayerGroup. When this occurs (that is, any multi-layer request where the global "Use Tiles" setting is set to use a single map-extent), GeoServer MapML extension "falls back" to processing the request via a GetMap-style client for images (\<map-link rel="image"...>). Processing a single-layer request in which the layer is a LayerGroup is a similar process to processing a multi-layer request in general. This issue, together with issues #73 and #72 will enable vector-based +/- tile MapML responses for a layer group or multi-layer GetMap / GetFeatureInfo requests, i.e. true "vector tiles" potentially containing data from more than a single layer. This issue focuses on LayerGroup processing.Aside: The MapML language has a \ element that is like a "square feature", in which the network source of the tile image is pointed to by the element in this requirement to support the processing of non-vector-capable layers in GeoServer in the context of GetMap / GetFeature requests for layer groups that contain such layers.
src
attribute, and the placement of the tile is specified by itsrow
,col
andzoom
attributes. We need to use the \The requirement outlined in this issue is to enable a request for a single LayerGroup to be serialized according to the passed
mapmlusefeatures
,mapmlusetiles
,mapmlmultiextent
token values for theformat_options
GeoServer WMS parameter, regardless of its inclusion of non-vector-capable layers.The implementation of this requirement will make it possible to render the component layers of any LayerGroup as though it was a simple vector-capable GeoServer Layer, as MapML \ +/- \ elements for each of the nested layers, rendered as sets of adjacent elements, in painter's model order in the response document.
The first requirement would be to add a "Use Features" checkbox to the LayerGroup Publishing tab's MapML section, right below the currently implemented "Use Tiles" checkbox:
This interface:
should be updated to become this:
(just as that panel has for the Layer Publishing tab currently).
Building upon previous requirements
To summarize #73, the user interface checkbox settings are used to dictate the URLs used (with the associated
mapmlusetiles
,mapmlusefeatures
,mapmlmultiextent
format_options values) in the GeoServer preview, but they may be set (dynamically) at runtime by a client in theformat_options
value that is passed via the GetMap / GetFeatureInfo parameter. In other words, the user interface checkboxes affect the preview that is generated, but do not diminish or affect the client's ability to select a different option at runtime. Put another way, the geoserver user interface settings are ignored when processing requests dynamically, relying instead on theformat_options
vendor parameter.In sum:
mapmlmultiextent
tells GeoServer if individual layers referenced in thelayers
parameter list should be represented as individualmapmlusetiles
tells the extension what the configuration of the \mapmlusefeatures
tells GeoServer to generate a \mapmlusetiles:true
is also set, the generated \type="text/mapml"
attribute, which tells the client to expect a "leaf-node" MapML document (i.e. a "leaf-node" document does not reference other text/mapml documents in a tree-like structure -- it is the deepest such node in the tree).Statement of Requirement on LayerGroup processing
For this requirement on GeoServer LayerGroup processing, when a GetMap or GetFeatureInfo request is received that includes this layer group in which thes and/or \ elements.
format_options=mapmlfeatures:true
(note it's mapmlfeatures:true here, not mapmlusefeatures:true) request parameter is found, GeoServer MapML extension should render the response "leaf-node" document as (painter's) ordered grouped-by-layer sets of \Below is an example of a MapML document generated in response to a traditional whole-map WMS GetMap request(for a layer group) like
GetMap&format=text/mapml&format_options=mapmlusefeatures:true
- note that the GetMap template below contains themapmlfeatures:true
format option, because the received request contained themapml**use**features:true
parameter value:If a given layer encountered in the recursive expansion of the layergroup's set of layers can NOT be represented as \ data i.e. is backed by a raster data set, it should be represented as a set of one or more \ elements within the stack of serialized layer data, ordered by distance of the tile center point from the request envelope/bbox center point.
So long as the non-templated GetMap request used in the \<map-tile src="GetMap or GetTile> returns transparent imagery, it may still be useful mixed into the feature information as such, TBD by experimentation with actual data, and it will be up to the GeoServer admin to validate that their layer groups are useful as configured.
e.g. the
tref
URL template above, when variable references were resolved to a WMS GetMap URL, the response might look like the following text/mapml document:Similarly, a layer group may be requested as tiled data, via the elements generated to represent requests for tiled data for the layer group are configured to either make "tile-shaped" WMS GetMap requests, or if the layer group has previously defined a tile cache and associated gridset, the \ will be configured to generate WMTS GetTile requests via the embedded \ element. This is possible today, although the configuration is not passed as a
mapmlusetiles:true
format option. In this case the \format_option
until #73 is resolved.Once #73 is working, it should now be possible, in response to a GetMap involving a layer group, to generate \s and associated child \\ which will generate requests for the layer group's content to be serialized as "tile shaped" text/mapml documents, with the appropriately clipped / spanned+styled and layer-ordered groups of \ elements to represent the layer group's constituent layers, with non-vector capable layers in the group represented by non-templated \ elements coded to the calculated zoom level (calculated based on the scale which is calculated from either the bbox of the GetMap, or the tile matrix level from the GetTile.