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

[GEOS-11207] Refactor MapML MVC controller as GetMap-based operation with standard parameter format #354

Conversation

turingtestfail
Copy link

@turingtestfail turingtestfail commented Dec 12, 2023

MapML controller refactored as a WMS Output format.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

petersmythe and others added 2 commits November 27, 2023 12:25
From GetCapabilitiesTransformer.java
Some beans of type `org.geoserver.platform.ModuleStatusImpl`
defined in `applicationContext.xml` spring beans definition files
aren't named.

Add `"id"="<beanName>"` in such cases.
@aaime aaime removed their assignment Dec 14, 2023
groldan and others added 5 commits December 14, 2023 13:34
…extension_names

Add missing extension names to ModuleStatusImpl spring beans
…er#7310)

* Metadata extensions: remove stacktrace and before work-around

* Metadata extension: get rid of severe logging
…ing logout

.. or if no preauth headers are provided anymore.

See https://osgeo-org.atlassian.net/browse/GEOS-11235 for more details.

Without this change, we can end up with a persisting session across
logout.

Tests: adding utests specific to this change. Runtime tested into
a docker composition.
…eoserver#7297)

* initial wip

* day2 - wip

* first working version

* wip

* working grids in WMS

* some QA fixes

* starting to work, still won't reload layers

* more fixes, still won't work on restart

* fixed label placements

* topleft style working, still won't restart

* seems to work

* QA fix format

* mostly working Graticule module

* more QA fix

* combine spacings into one layer, selectable by level

* qa cleanup

* opening docs

* fix docs issue

* general clean up and testing

* fix restart issue with ReferencedEnvelope Parameters

* remove unneeded style handler

* move to ContentDataStore

* add single edge positions

* QA fixes

---------

Co-authored-by: Ian Turton <ian@ianturton.com>
@turingtestfail turingtestfail force-pushed the GEOS-11207-MapML-GetMap-parameter-format branch 3 times, most recently from f22fada to 73ef467 Compare December 23, 2023 00:57
@prushforth
Copy link
Collaborator

prushforth commented Dec 23, 2023

A few comments, I will continue to evaluate and add to them I can. Might take a few days. Also, the mapml-viewer doesn't seem to work to query multiple <map-extent> elements, but a more recent build of our current work does appear to work better for that use case. I will switch back and forth, but I am only worrying about the server functionality for your work. We'll update the viewer when there's an opportunity. Also, I would be willing to try to offer some edits of your PR if necessary. Just let me know if you feel that there's something I mention that I should tackle.

  • multi-layer, single <map-extent> (set via default WMS global MapML rendering setting) preview request does not appear to include a <map-link rel=query> example, but a single-layer <map-extent> preview request does include the query link - example
  • multi-<map-extent> GetMap, query working well (with newer version of the mapml-viewer) example (same as previous link with WMS global MapML rendering setting changed to emit multiple <map-extent>s)
  • for multi-<map-extent> GetMap requests, the hidden="hidden" attribute could be omitted from the <map-extent> elements. The purpose of multi-<map-extent> layers is to enable the user to turn them on / off via the layer control. hidden="hidden" <map-extent> and <layer-> elements are not presented in the layer control, by design.
  • the default MapML preview link does render the layer at the center of the map, it seems only for EPSG:4326 URLs? I imagine that the bbox that is calculated for the preview link URL is the bounds of the layer in the coordinate system of the preview, and I also imagine that the lat/lon/zoom values of the <mapml-viewer> in the preview is set based on that bbox. So I guess it's pretty difficult to 'hack' the URL to get a good preview. If you right-click the layer in the layer control and select 'Zoom to layer', you get a good preview, it seems.
  • Some preview links don't work because the srs referenced doesn't have a MapML TCRS mapping. Could we change the preview URL to a standard TCRS-mappable EPSG code? example
  • alternate projection links are invalid geoserver WMS links - when dereferenced we get:

Missing or invalid requested map size. Parameters WIDTH and HEIGHT shall be present and be integers > 0. Got WIDTH=0, HEIGHT=0

@turingtestfail turingtestfail force-pushed the GEOS-11207-MapML-GetMap-parameter-format branch 2 times, most recently from 0123632 to 8b1635d Compare December 26, 2023 20:51
@turingtestfail
Copy link
Author

turingtestfail commented Dec 26, 2023 via email

aaime and others added 8 commits December 27, 2023 08:42
* [GEOS-11216] Graticule datastore code simplifications and QA

* [GEOS-11216] Allow to fetch levels by equality, using >= won't work if the steps are not multiple of each other

* [GEOS-11216] Simplify labelling, and show examples of how to create a compact style
…t-if-preauth-headers-changed-upstream

[GEOS-11235] preauthentication filters - session reuse even after having logout
Removes gs-main dependency on mockito-inline, since version 5.0
mockito-inline is the default mockmaker.
See https://github.com/mockito/mockito/releases/tag/v5.0.0
Eesymock can't extend InetAddress because it's a sealed class
@prushforth
Copy link
Collaborator

prushforth commented Dec 28, 2023

Hi Joe,

  1. Fixed to include query links for a multi-layer request.

Looks good, thanks!

  1. Hidden removed from mult- map-extent.

Thank you.

  1. I believe we will be discussing the way forward for TCRS at the next
    meeting?

Sounds good.

  1. Alternate project links fixed to include WIDTH and HEIGHT.

The bbox parameter is missing from the alternate projection links. Sorry I should have picked up on this before, but the error message only mentioned width and height at first, but now it's mentioning bbox.

Regarding:

  1. Still looking into this.
  • Only EPSG:4326 previews work; you can't get a correct preview for a layer set up with EPSG:3857, EPSG:3978, EPSG:5936 as the declared EPSG. To try to get the USA Population preview to display in EPSG:3857, for example, I used the following settings:
    image

The when the MapML preview link is generated, the map loads but is blank / empty. If I right-click on the layer in the layer control and select "Zoom to layer", the preview is correctly displayed. This suggests that the starting location of the <mapml-viewer lat=... lon=... zoom=...> element in the HTML page is not being correctly set to the de-projected center of the layer bounds. Upon examination, the lat and lon appear to contain non-geographic coordinates initially.

@prushforth
Copy link
Collaborator

It's interesting that in the previous version, all resources that matched the pattern "text/.*" would be passed through the gzip filter and they would take the full Keep-Alive: timeout=20 header value of 20 seconds to complete the request in the browser. So that would include the text/html and text/mapml responses from the original MapMLController.

In the current version, there is no MapMLController, and the text/html; subtype=mapml and text/mapml responses are gzipped and only take a few milliseconds to complete. However, the resource file "mapml.css" (served as text/css) still takes the full 20 seconds.

(The reason these are taking 20 seconds is because the Content-Length: 28502 value is set to the unzipped file size, not the zipped content size, so the client leaves the connection open for the full 20 seconds of the Keep-Alive value)

So whatever process is passing the resource file to the gzip filter is not working well with the gizp filter, and I guess that process is not the same process as the WMS request processor.

Long story short, the user still has to remove the text/.* from the web.xml gzip filter parameter.

@prushforth
Copy link
Collaborator

Caveat for this commit is that if you want the default style correctly listed, you need to explicitly add a copy of the base layer group configuration as a layer group style named "default-style-"+layerGroupName (which is the name assigned to the default in the capabilities anyway). Trouble is that it ends up as a duplicate in the capabilities, but it mirrors the same difficulty with default styles for layers, which is that you must add the default style as an explicitly added style (in the case of layer groups, you must name it "default-style-"+layerGroupName, resulting in the duplication in the capabilities document).

Long story short, I need to add a test or two for this, and I should add documentation for how to get access to named styles for both layers and layer groups.

@prushforth prushforth force-pushed the GEOS-11207-MapML-GetMap-parameter-format branch from 4379932 to 4efbbdb Compare January 8, 2024 12:44
petersmythe and others added 16 commits January 8, 2024 17:19
…rams

[GEOS-11051] Env parametrization does not save correctly in AuthKey extension
…nfo.accept(CatalogVisitor)

`ModificationProxy` breaks information hidding on `CatalogInfo.accept(CatalogVisitor)`,
exposing the proxied object.

Follow up on commit 01bd2f2 (from
GEOS-10356) which fixed it only for `FeatureTypeInfo`, by calling the
appropriate `CatalogVisitor.visit(...)` overload method with the
`ModificationProxy` proxy object and not with its internal
`CatalogInfo`.
[GEOS-10933] Fix keycloak plugin logout
@turingtestfail turingtestfail force-pushed the GEOS-11207-MapML-GetMap-parameter-format branch from 2b9e7e4 to d234ddc Compare January 19, 2024 18:49
…with standard parameter format

working on builder

initialize first pass

more initialize

finished first pass at head

builder first pass done

first pass at marshalling mapml map response stuff

changed the proj stuff

first pass at formatlink

Got main test working

most tests done

more tests included

all original tests passing

html

html test passing

added height and width

int not double

subtype not format

cleanup

copyright missing

more test cleanup

added default image type to HTML

fixed empty style issue

exceptions were being prematurely caught

PR responses

test cleanup

added WMS parameter and fixed header base and header styles

WMS parameter and requested changes, XML validated

fixed issues with XML namespaces and some misc fixes for new extent handling

switched from WMS to serviceinfo metadata

clean up

added multilayer tests

Front end multi-extent setting

front end test

doc updates

doc tweak

alt link height and width and remove hidden from multi-extent

query_layers for single extent

added bbox to alt and switch center lat and lon of html to use wgs84

style and self style title, bbox, width, height

added empty commas for default styles

self style default

fixed regular styles issue

Add label to multi-extent map-extent when global MapML setting enabled

Fix NPE with multi-layer, single extent requests across, layers, groups

fix issue with trailing blank style

Added test for trailing comment in styles list

Make GetMap with format=text/html; subtype=mapml respect bbox param

Add <map-link rel=style> and <map-link rel="self style" for named
styles for sinble LayerGroup requests.

Replace .equals with .equalsIgnoreCase for string comparison of style
names

GetMap tests

fix pmd for test

wms output format documentation

style note

Add some images and description to docs

fixed tcrs issue

Change WMTS GetFeatureInfo parameter name from "info_format" (WMS) to
"infoformat" (WMTS). Why do they do that :-) ?

revert
@turingtestfail turingtestfail force-pushed the GEOS-11207-MapML-GetMap-parameter-format branch from d234ddc to 2be5fa0 Compare January 19, 2024 18:55
@aaime aaime closed this Feb 27, 2024
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

Successfully merging this pull request may close these issues.