1

I am using GeoServer 2.15 to provide the INSPIRE view service. I am testing it with the INSPIRE reference validator and the test fails for the GetMap operation. The validator expects the service to throw an exception when the parameters, “version”, styles”, “crs” and “transparent” are missing. Unfortunately GeoServer does not throw the exception. Looking at the standard specification, it seems that ¾ of these parameters, except “transparent”, are mandatory. I tried to click the “Strict CITE compliance” check box in the GeoServer WMS settings page, but with no luck.

Are there any suggestions on how I could solve this?

2
  • 2
    ignore it as it is clearly a stupid test? sponsor an enhancement to GeoServer to fix the CITE compliance?
    – Ian Turton
    Commented Nov 27, 2019 at 10:06
  • 1
    Not totally stupid test, accepting GetMap without CRS is very stupid from a server because WMS does not have default CRS. Accepting request without version might work because CRS reveals that it must be version 1.3.0 and axis order should be handled by that. But now GeoServer seems to send an empty output so something fails badly.
    – user30184
    Commented Nov 27, 2019 at 12:17

1 Answer 1

1

I made a test with GeoServer 2.16 that is installed from the bin-zip installer without changing the default settings by leaving out parameters from GetMap one by one.

A standard-compliant request

http://localhost:8080/geoserver/nurc/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/jpeg&TRANSPARENT=true&LAYERS=nurc:Img_Sample&CRS=EPSG:4326&STYLES=&WIDTH=768&HEIGHT=372&BBOX=35.134,-101.370,39.221,-92.933

Result: valid output, no error. This is expected.

Request with styles missing

http://localhost:8080/geoserver/nurc/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/jpeg&TRANSPARENT=true&LAYERS=nurc:Img_Sample&CRS=EPSG:4326&WIDTH=768&HEIGHT=372&BBOX=35.134,-101.370,39.221,-92.933

Result: valid output, no error. This is somewhat expected because the parameter was just a dummy &STYLES=. Against the standard anyway.

Request with transparent missing

http://localhost:8080/geoserver/nurc/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/jpeg&LAYERS=nurc:Img_Sample&CRS=EPSG:4326&STYLES=&WIDTH=768&HEIGHT=372&BBOX=35.134,-101.370,39.221,-92.933

Result: valid output, no error. This is expected because transparentis not a mandatory parameter in WMS 1.3.0 GetMap. Inspire validator is wrong here.

Request with CRS missing

http://localhost:8080/geoserver/nurc/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/jpeg&TRANSPARENT=true&LAYERS=nurc:Img_Sample&STYLES=&WIDTH=768&HEIGHT=372&BBOX=35.134,-101.370,39.221,-92.933

GeoServer does not give an error but it sends an empty output.

Request with version missing http://localhost:8080/geoserver/nurc/wms?SERVICE=WMS&REQUEST=GetMap&FORMAT=image/jpeg&TRANSPARENT=true&LAYERS=nurc:Img_Sample&CRS=EPSG:4326&STYLES=&WIDTH=768&HEIGHT=372&BBOX=35.134,-101.370,39.221,-92.933

GeoServer does not give an error but it sends an empty output.

I would suggest to file a GeoServer bug about the "version" and "crs" cases. When it comes to "transparent" the bug is in the test. Styles may be a corner case and being lenient is understandable. In the strict CITE mode it should lead to an error.

I tried also to set WMS into the strict CITE mode but it did not change anything with my test requests, not even after restarting GeoServer.

2
  • For WMS+SLD specification, STYLES is required even if the default style is intended like STYLES& or STYLEs=,& (for two layers), unless a style is specified in an SLD or SLD_BODY parameter, for pure WMS (are there any) STYLES is required
    – nmtoken
    Commented Nov 27, 2019 at 12:50
  • Yes, I have table 8 from WMS 1.3.0 standard OGC 06-042 open. I was meaning that it is unlikely that GeoServer, when it is lenient and does not require STYLES, can make real harm for users because interpreting that missing STYLES means the same default style as using correctly an empty value in STYLES=.
    – user30184
    Commented Nov 27, 2019 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.