I have a large number - more than 60 thousand - of relatively small
Geotiffs, usually from 2 to 12 Mb. I have a web client that uses
Leaflet to view them, but things are quite slow even inside our own
network. I have a hunch that both Geoserver and these Geotiffs are not
configured in the best way possible.
The tiffs were generated from a bunch of EPSG:3035 Ascii grid files
using this command:
for f in *.rsl; do gdal_translate -a_srs EPSG:3035 -co "TILED=YES"
-co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -co "COMPRESS=DEFLATE" -co
"ZLEVEL=9" -co "BIGTIFF=YES" $f $f.tif; done
Then I wrote a Python script that created a store and a layer for each
of the tiffs.
Here is the output from gdalinfo for a typical one:
Driver: GTiff/GeoTIFF
Files: se502c_R9_C1_3_T_2531_sec.rsl.tif
Size is 3396, 2271
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",52],
PARAMETER["longitude_of_center",10],
PARAMETER["false_easting",4321000],
PARAMETER["false_northing",3210000],
As you can see they are EPSG:3035. They should be internally tiled. In
the Coordinate Reference Systems for Geoserver, it says that both
Native SRS and Declared SRS are EPSG:3035, and that the handling
should be to reproject native to declared.
My web client overlays these Geotiffs on a standard OpenStreetMap
layer in Web Mercator. All the geotiffs we have tried appear
correctly, so I guess reprojection is still happening at some stage.
My gut feeling is that I might gain some speed by reprojecting the
original Geotiffs to Web Mercator, or at least changing the declared
SRS to Web Mercator in Geoserver. Not keen on it, it's going to take
days. What other properties of the Geotiffs could I tinker with?
Would caching with GeoWebCache help, given the file size?
Bonus question - if a Geotiff is changed, by reprojecting or retiling
or what have you, does the Geoserver layer associated with it get
invalidated? It took days to create them all.
I'd really appreciate your feeback.
Thanks in advance,
Max