Hi,
We've validated our GeoServer 2.1.3 setup (incl. INSPIRE plugin) with
the testsuite for the German Spatial Data Infrastructure (GDI-DE) [1].
All tests were successful, except one concerning the GetLegendGraphics
operation:
Requirement: The size of the LegendURL for Style X in Layer Y is 20x20.
Message: Error: The actual size of
'http://geoserver?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=Y’
is 119x93
Obviously the interpretation of the width/height parameter in
GeoServer and the testsuite is different. So the key question is:
Should the width parameter (and height respectively) specify the width
of the complete image (as proposed in GEOS-2963) or just the width of
the "keyimage" (see GEOS-814)?
The testsuite requires the former behaviour but Geoserver implements
the latter.
I've checked the SLD spec [2] and it states the following concerning
the width/height parameter:
1) "This gives a hint for the width of the returned graphic in pixels.
Vector-graphics can use this value as a hint for the level of detail
to include."
2) "Width=300 | Optional | Positive integer pixel width of desired output".
3) It also includes an example that has a rule:
"http://www.vendor.com/wms.cgi?
VERSION=1.1.0&
REQUEST=GetLegendGraphic&
LAYER=ROADL_1M%3Alocal_data&
STYLE=my_style&
RULE=highways&
SLD=http%3A%2F%2Fwww.sld.com%2Fstyles%2Fkpp01.xml&
WIDTH=16&
HEIGHT=16&
FORMAT=image%2Fgif&
which would produce a 16x16 icon for the Rule named “highways” defined
within layer
“ROADL_1M:local_data” in the SLD..."
Well, the spec leaves room for interpretation.. I would interpret it
like this: WIDTH= should be the width of the keyimage if the request
contains a RULE= parameter, otherwise it should be the width of the
complete legend image. What do you think? Is this a "semantic bug" in
the testsuite or in GeoServer?
Regards,
Torsten
[1] GDI-DE Testsuite (login required): http://testsuite.gdi-de.org/gdi/
[2] Styled Layer Descriptor (SLD) 1.1:
http://portal.opengeospatial.org/files/?artifact_id=22364