Hi all,

I would like to serve GeoTIFFs via GeoServer as WMS / WMTS.

Basically, this is not a problem, but the GeoTIFFs should use as little disk 
space as possible while still being very performant when accessed via WMS.


In the past, I worked with LZW compression, but the required storage space was 
quite large.

After making the disturbing white/black borders transparent and generating 
internal pyramids, the performance and visual quality were excellent—but the 
storage requirements became enormous.

So I referred to Paul Ramsey's article:
https://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html
By using JPEG compression, I was able to reduce the storage requirement to 
about 1/6 of the original size, and the performance is still good.
However, the problem is that I now get black artifacts around the edges when 
accessing the data via WMS.
I suspect this is due to the JPEG compression.
In the ZIP archive linked below, you’ll find two screenshots showing the final 
result.

The script I’m using is somewhat old (some excerpts are also included in the 
ZIP archive), so there might already be better ways to achieve this?

These are the steps I currently follow:

  *   Create a mosaic VRT with alpha band from all source data

  *   Clip the mosaic VRT using a shapefile (to remove white/black borders) and 
transform it into the target coordinate system, using the 4th band 
(transparency) as a mask

  *   Generate tiles with a size of 10,000 x 10,000 pixels

  *   Compress the tiles

  *   Generate internal pyramids

Am I overlooking something in my process?
Do you have any ideas on how I can get rid of the artifacts while still keeping 
disk usage low?
https://drive.google.com/file/d/1zRY2Xj8eJ-T7e9p3qp4HEknum0VJR81W/view?usp=sharing

Best regards,

Carsten

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to