EOFarm / geoportal.ypen.gr

0 stars 0 forks source link

Legend URL missing version information from Capabilities document in GeoServer 2.20.0 #10

Closed kalxas closed 2 years ago

kalxas commented 2 years ago

image

kalxas commented 2 years ago

Linked to #7

kalxas commented 2 years ago

Error from Validator:

image

kalxas commented 2 years ago

Documentation about GetLegendGraphic: https://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/index.html

kalxas commented 2 years ago

Upstream issue: https://osgeo-org.atlassian.net/browse/GEOS-5472

kalxas commented 2 years ago

And this is the line where all happens: https://github.com/geoserver/geoserver/blob/2.20.x/src/wms/src/main/java/org/geoserver/wms/capabilities/Capabilities_1_3_0_Transformer.java#L1275

kalxas commented 2 years ago

Here as well: https://github.com/geoserver/geoserver/blob/2.20.x/src/wms/src/main/java/org/geoserver/wms/capabilities/Capabilities_1_3_0_Transformer.java#L1608-L1710

kalxas commented 2 years ago

We can add a custom Legend URL through the Styles UI:

image

kalxas commented 2 years ago

@grigoriouelena shall we add a custom URL so we can test the validator?

kalxas commented 2 years ago

Reported upstream here: https://osgeo-org.atlassian.net/browse/GEOS-10336

grigoriouelena commented 2 years ago

After various tries I come to the conclusion that the provision of an image URL in the Styles GUI is independent of the LegendURL that geoserver forms for the legend graphic in the getcapabilities response.

By that I mean that whatever legend the user defines in the Styles GUI, geoserver will still provide a GetLegendGraphic request to the WMS, omitting the version parameter.

Relevant issue in the INSPIRE validation helpdesk here: https://github.com/INSPIRE-MIF/helpdesk-validator/issues/680

@kalxas I guess that we should try to find the template that geoserver uses to form the capabilities response and add the version parameter. How feasible is this?

kalxas commented 2 years ago

I guess this one is also to be closed @grigoriouelena ?