external legend graphics problems using GeoServer 2.14

Description

Due to a complex style, we want to use an externally generated image as a legend. Therefore we put it right into the style configuration as legend graphics.

1. The url is only recognized, if it ends with a valid extension (we use a dummy parameter &helper=legend.png).

  • ExternalGraphicPanel (line 91)

2. The image size is fixed. That seems to be a problem, due to our legend graphics is generated and may vary in size.
3. Assume we used the legend url:
http://192.168.10.115:8088/gm.gisserver/rest/projects/test_fh2_postgresql/reports/generate/simple?reportid=201.1000&reporttype=PNG&helper=legend.png

then within the capabilities document the legend part is:

<LegendURL width="160" height="144">
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.10.115:8088/geoserver/styles/test_fh2_postgresql/http://192.168.10.115:8088/gm.gisserver/rest/projects/test_fh2_postgresql/reports/generate/simple?reportid=201.1000&reporttype=PNG&helper=legend.png"/>
</LegendURL>

You see, the workspace URL is attached in front of it (http://192.168.10.115:8088/geoserver/styles/test_fh2_postgresql/)

4. How is a GetLegendGraphic request formulated? We don't know the size of our generated image. We want to set with / height for geoserver generated legend graphics. If we put width / height = 20 into our URL, the complete external legend graphics is scaled to 20x20.

Best regards

Tobias

Environment

None

Status

Assignee

Unassigned

Reporter

Tobias Warneke

Triage

None

Fix versions

None

Affects versions

Components

Priority

High
Configure