0

I have a NetCDF file containing 5 depth levels of a sea area. On my GeoServer I've enabled the elevation property and The getCapabilities function returns this information:

<Dimension name="elevation" default="0.0" units="EPSG:5829" unitSymbol="m">-9.0,-5.0,-3.0,-2.0,0.0</Dimension>

which seems to recognize correctly the 5 levels. However both getMap and getFeatures functions return always the values of the "-9.0" level. Is there any other option on the GeoServer I should consider in order to use correctly the depth information?

To provide an additional information, the GeoServer uses imagemosaic with PostgreSQL to manage multiple files.

Part of the logs that include the information about the elevation:

2021-05-04 10:41:52,071 DEBUG 

[org.geoserver.security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /XXX/wms, QueryString: REQUEST=GetFeatureInfo&SERVICE=WMS&SRS=EPSG%3A4326&STYLES=s&TRANSPARENT=true&VERSION=1.1.0&FORMAT=image%2Fpng&BBOX=11.808929443359377%2C44.44652641501047%2C12.77984619140625%2C45.03180328005858&HEIGHT=600&WIDTH=707&LAYERS=XXX%3Ao2&QUERY_LAYERS=XXX%3Ao2&INFO_FORMAT=text%2Fhtml&X=617&Y=144&elevation=-5.0'; against '/**'
2021-05-04 10:41:52,071 DEBUG [org.geoserver.security.IncludeQueryStringAntPathRequestMatcher] - Request matched by universal pattern '/**'
2021-05-04 10:41:52,071 DEBUG [org.geoserver.security.IncludeQueryStringAntPathRequestMatcher] - Matched Path: /XXX/wms, QueryString: REQUEST=GetFeatureInfo&SERVICE=WMS&SRS=EPSG%3A4326&STYLES=s&TRANSPARENT=true&VERSION=1.1.0&FORMAT=image%2Fpng&BBOX=11.808929443359377%2C44.44652641501047%2C12.77984619140625%2C45.03180328005858&HEIGHT=600&WIDTH=707&LAYERS=XXX%3Ao2&QUERY_LAYERS=XXX%3Ao2&INFO_FORMAT=text%2Fhtml&X=617&Y=144&elevation=-5.0 with /**
2021-05-04 10:41:52,071 DEBUG [org.geoserver.monitor] - Testing /XXX/wms for monitor filtering
2021-05-04 10:41:52,075 TRACE [org.geoserver.ows.OWSHandlerMapping] - Mapped to HandlerExecutionChain with [org.geoserver.ows.Dispatcher@58f03739] and 1 interceptors
2021-05-04 10:41:52,075 INFO [org.geoserver.wms] - 
Request: getServiceInfo
2021-05-04 10:41:52,075 DEBUG [org.geoserver.ows] - Getting layers and styles from LAYERS and STYLES
2021-05-04 10:41:52,075 DEBUG [org.geoserver.ows] - establishing s style for Crea:o2
2021-05-04 10:41:52,076 INFO [org.geoserver.flow] - Control-flow inactive, there are no configured rules
2021-05-04 10:41:52,160 TRACE [org.geoserver.jai] - Recycling tile hit on type:1, banks: 262,144, arrayLength: {3}
2021-05-04 10:41:52,160 TRACE [org.geoserver.jai] - Recycling tile hit on type:1, banks: 262,144, arrayLength: {3}
2021-05-04 10:41:52,160 TRACE [org.geoserver.jai] - Recycling tile hit on type:1, banks: 262,144, arrayLength: {3}
2021-05-04 10:41:52,160 INFO [org.geoserver.wms] - 
Request: getFeatureInfo
    BaseUrl = http://.../geoserver/
    Exceptions = application/vnd.ogc.se_xml
    FeatureCount = 1
    Get = false
    GetMapRequest = 
GetMap Request
 version: 1.1.0
 output format: image/png
 width height: 707,600
 bbox: SRSEnvelope[11.808929443359377 : 12.77984619140625, 44.44652641501047 : 45.03180328005858]
 layers: XXX:o2
 styles: s
    InfoFormat = text/html
    PropertyNames = null
    QueryLayers = [org.geoserver.wms.MapLayerInfo@704187f0]
    RawKvp = {FORMAT=image/png, INFO_FORMAT=text/html, ELEVATION=-5.0, STYLES=s, WIDTH=707, HEIGHT=600, LAYERS=XXX:o2, REQUEST=GetFeatureInfo, SRS=EPSG:4326, BBOX=11.808929443359377,44.44652641501047,12.77984619140625,45.03180328005858, VERSION=1.1.0, X=617, Y=144, SERVICE=WMS, QUERY_LAYERS=XXX:o2, TRANSPARENT=true}
    Request = GetFeatureInfo
    RequestCharset = null
    Version = 1.1.1
    XPixel = 617
    YPixel = 144
2021-05-04 10:41:52,165 DEBUG [org.geoserver.filters] - Compressing output for mimetype: text/html;charset=UTF-8
2021-05-04 10:41:52,166 DEBUG [org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing complete
5
  • how are you requesting the different levels – Ian Turton May 4 at 9:37
  • for example: https://..../geoserver/XXX/wms?REQUEST=GetFeatureInfo&SERVICE=WMS&SRS=EPSG%3A4326&STYLES=s&TRANSPARENT=true&VERSION=1.1.0&FORMAT=image%2Fpng&BBOX=11.808929443359377%2C44.44652641501047%2C12.77984619140625%2C45.03180328005858&HEIGHT=600&WIDTH=707&LAYERS=XXXX&QUERY_LAYERS=XXXX&INFO_FORMAT=text%2Fhtml&X=617&Y=144&ELEVATION=-2 It seems it recognizes the depth levels because it returns a values just for the 5 levels available but the returned info belong just to the -9 level – Thomas May 4 at 9:43
  • try elevation -2.0 rather than -2 – Ian Turton May 4 at 9:45
  • we already tried that. unfortunately does not work – Thomas May 4 at 9:48
  • You need to turn up the logging level to developer in the global settings page, and then make the request again. Then edit your question with the relevant part of the log file. – Ian Turton May 4 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.