When making WMS requests to view band 1 of a two band imagemosaic layer the image returned isn't always valid. Sometimes I only get an image with a very sparse set of pixels. Whether or not the returned image is correct or not seems to be dependant on a combination of the bbox and width/height parameters.

First here is a request along with a "good" image that is returned. Notice that the width and height are 256x270.


enter image description here

However the image I really want should have a width and height of 256x256 When I make that request I get a bad image:


enter image description here

I can also get a valid image by leaving the width and height at 256, but shifting one of the bbox params. For instance changing the first bbox value to -13018754 works although the image is warped as expected:


enter image description here

Here is the band1 style:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
      <Title>Band 1</Title>
            <ColorMap extended="true">         
              <ColorMapEntry color="#FFFFFF" quantity="0" label="" opacity="0"/>
              <ColorMapEntry color="#5e4fa2" quantity="3000" label="3000"/>
<ColorMapEntry color="#3288bd" quantity="3600" label="3600"/>
<ColorMapEntry color="#66c2a5" quantity="3650" label="3650"/>
<ColorMapEntry color="#abdda4" quantity="3700" label="3700"/>
<ColorMapEntry color="#e6f598" quantity="3720" label="3720"/>
<ColorMapEntry color="#ffffbf" quantity="3740" label="3740"/>
<ColorMapEntry color="#fee08b" quantity="3760" label="3760"/>
<ColorMapEntry color="#fdae61" quantity="3780" label="3780"/>
<ColorMapEntry color="#f46d43" quantity="3800" label="3800"/>
<ColorMapEntry color="#d53e4f" quantity="3900" label="3900"/>
<ColorMapEntry color="#9e0142" quantity="4000" label="4000"/>

Any ideas as to why the second image doesn't look more like the first image?

Below is the log output for the 2nd request (the one that displays the bad image):

2016-08-23 21:32:08,311 INFO [geoserver.wms] -
Request: getServiceInfo
2016-08-23 21:32:09,579 INFO [geoserver.wms] -
Request: getMap
        Width = 256
        Height = 256
        Layers = [org.geoserver.wms.MapLayerInfo@71b7b06a]
        Crs = PROJCS["WGS 84 / Pseudo-Mercator",
  GEOGCS["WGS 84",
    DATUM["World Geodetic System 1984",
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic latitude", NORTH],
    AXIS["Geodetic longitude", EAST],
  PROJECTION["Popular Visualisation Pseudo Mercator", AUTHORITY["EPSG","1024"]],
  PARAMETER["semi_minor", 6378137.0],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["central_meridian", 0.0],
  PARAMETER["scale_factor", 1.0],
  PARAMETER["false_easting", 0.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
        Bbox = SRSEnvelope[-1.0018754E7 : -8766409.899970293, 5009377.085697313 : 6261721.357121641]
        RemoteOwsType = null
        RemoteOwsURL = null
        Env = {}
        FormatOptions = {}
        Angle = 0.0
        CQLFilter = null
        Elevation = []
        FeatureId = null
        StartIndex = null
        ViewParams = null
        MaxFeatures = null
        Tiled = false
        Palette = null
        FeatureVersion = null
        SRS = urn:x-ogc:def:crs:EPSG:3857
        Styles = [StyleImpl[ name=band1]]
        BgColor = java.awt.Color[r=255,g=255,b=255]
        Transparent = true
        StyleFormat = sld
        SldBody = null
        ValidateSchema = false
Sld = null
        StyleUrl = null
        TilesOrigin = null
        Interpolations = []
        Exceptions = SE_XML
        StyleBody = null
        SldVersion = null
        StyleVersion = null
        ScaleMethod = null
        Filter = null
        Buffer = 0
        Format = image/png
        Time = [Fri Jan 01 00:00:00 GMT 2010]
        Filters = null
        Get = true
        RawKvp = {FORMAT=image/png, REQUEST=GetMap, SRS=EPSG:3857, BBOX=-10018754,5009377.085697313,-8766409.899970293,6261721.357121641, VERSION=1.3.0, STYLES=inca:band1, SERVICE=WMS, TIME=2010-01-01T00:00:00.000Z, WIDTH=256, HEIGHT=256,
TRANSPARENT=true, LAYERS=inca:inca2}
        BaseUrl = http://geoserverInstance:80/geoserver/
        RequestCharset = UTF-8
        Version = 1.3.0
        Request = GetMap
  • What is in the log file? – Ian Turton Aug 23 '16 at 19:44
  • @iant I've attached the log output for the misbehaving request. – apricity Aug 23 '16 at 21:26

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.