1

I have five GeoTIFF files that I have setup in GeoServer. I am displaying these on a OpenLayers map. I have tried some recommendations in the data considerations, such as inner tiling and setting up overviews, however the performance seems lacking being that these aren't very large files. I was hoping I could get some feedback as to a good way to structure these TIFFs to optimize performance when tiling. See below the output for file info of the unaltered files:

Driver: GTiff/GeoTIFF
Size is 109320, 88072
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-10968941.448953511193395,5653006.415421720594168)
Pixel Size = (32.241277618252468,-32.241277618252468)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-10968941.449, 5653006.415) ( 98d32' 8.44"W, 45d11'58.72"N)
Lower Left  (-10968941.449, 2813452.613) ( 98d32' 8.44"W, 24d29'30.51"N)
Upper Right (-7444324.980, 5653006.415) ( 66d52'24.63"W, 45d11'58.72"N)
Lower Right (-7444324.980, 2813452.613) ( 66d52'24.63"W, 24d29'30.51"N)
Center      (-9206633.214, 4233229.514) ( 82d42'16.54"W, 35d30'31.36"N)
Band 1 Block=109320x1 Type=Byte, ColorInterp=Gray
  NoData Value=255
  Metadata:
    RepresentationType=THEMATIC




Driver: GTiff/GeoTIFF
Size is 109320, 88072
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-10968941.448953511193395,5653006.415421720594168)
Pixel Size = (32.241277618252475,-32.241277618252475)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-10968941.449, 5653006.415) ( 98d32' 8.44"W, 45d11'58.72"N)
Lower Left  (-10968941.449, 2813452.613) ( 98d32' 8.44"W, 24d29'30.51"N)
Upper Right (-7444324.980, 5653006.415) ( 66d52'24.63"W, 45d11'58.72"N)
Lower Right (-7444324.980, 2813452.613) ( 66d52'24.63"W, 24d29'30.51"N)
Center      (-9206633.214, 4233229.514) ( 82d42'16.54"W, 35d30'31.36"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Gray
  NoData Value=255
  Overviews: 54660x44036, 27330x22018, 13665x11009, 6833x5505, 3417x2753, 1709x1377, 855x689, 428x345, 214x173
  Metadata:
    RepresentationType=THEMATIC

gdalinfo output.tif -stats:

Driver: GTiff/GeoTIFF
Size is 109320, 88072
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-10968941.448953511193395,5653006.415421720594168)
Pixel Size = (32.241277618252475,-32.241277618252475)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-10968941.449, 5653006.415) ( 98d32' 8.44"W, 45d11'58.72"N)
Lower Left  (-10968941.449, 2813452.613) ( 98d32' 8.44"W, 24d29'30.51"N)
Upper Right (-7444324.980, 5653006.415) ( 66d52'24.63"W, 45d11'58.72"N)
Lower Right (-7444324.980, 2813452.613) ( 66d52'24.63"W, 24d29'30.51"N)
Center      (-9206633.214, 4233229.514) ( 82d42'16.54"W, 35d30'31.36"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Gray
  Minimum=1.000, Maximum=99.000, Mean=7.573, StdDev=17.275
  NoData Value=255
  Overviews: 54660x44036, 27330x22018, 13665x11009, 6833x5505, 3417x2753, 1709x1377, 855x689, 428x345, 214x173
  Metadata:
    RepresentationType=THEMATIC
    STATISTICS_MAXIMUM=99
    STATISTICS_MEAN=7.5732497554581
    STATISTICS_MINIMUM=1
    STATISTICS_STDDEV=17.27458624911

I tried the following:

  • Tiled 256x256 and 512x512 -- This slowed down performance
  • Added overviews(with average and bilinear resampling) -- This sped up performance on first load of course, however it filled in null values to the point that looked misrepresentative of the data (See images)

Raw image in GeoServer: enter image description here enter image description here

With overview: enter image description here enter image description here

12
  • that tiff is not tiled nor does it have overviews.
    – Ian Turton
    Dec 4, 2020 at 16:31
  • @IanTurton That is the unaltered TIFF file that I was posting for reference.
    – Baker
    Dec 4, 2020 at 16:36
  • I updated the description with the options I have tried, along with some pictures of the map.
    – Baker
    Dec 4, 2020 at 16:43
  • I would use tiles, compression and nearest neighbour for the overviews.
    – Ian Turton
    Dec 4, 2020 at 16:59
  • @IanTurton I was using the default levels for overviews with gdaladdo. Is this fine do you think? Also, I'll see how nearest neighbor looks.
    – Baker
    Dec 4, 2020 at 17:07

1 Answer 1

0

The presence of null values and shown as black pixels in the image is because your NoData is represented as black by Geoserver.

See this post: Setting transparency for no data in raster in geoserver

To avoid that, either you transform your raw data using GDAL for not having such NoData values inside the raster and before uploading it to Geoserver, OR create a style in Geoserver for not representing the null values as black.

1
  • I don't believe this is the case. If it were, wouldn't I see black all across the screen and not just where the resampling is taking place?
    – Baker
    Dec 4, 2020 at 17:06

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.