Commit 27c09a3c authored by Nils Brinckmann's avatar Nils Brinckmann Committed by Nils Brinckmann
Browse files

Use a way stronger compression

The deflate compression is the algorithm used for zip archives.
It is loss less and features some more tweaking options in order
to get smaller results.

With the usage of quite heavy compression options, we can reduce
the usual amount of memory of shakemap geotiff files to need only
around 60% of the original size using the lzw algorithm.

Of cause, read and write times will increase. But as the size of
a single shakemap is relativly small (our problem with the size is
the pure amount that we have for the earthquake explorer), it should
not be totally bad to work with those files later.
parent 602f863a
Pipeline #26403 failed with stage
in 13 minutes and 47 seconds
......@@ -370,7 +370,17 @@ class Shakemap(object):
"src_transform": transform,
"dst_transform": transform,
"crs": "+proj=latlong",
"compress": "lzw",
# As we create a lot of those geotiff files in the earthquake event explorer
# and want to store them on a map server, we want to make sure that the resulting
# geotiffs are small.
# That is why the we want to use a compression algorithm with some more custom options.
# The deflate algorithm is a loss less algorithm that is also used for the zip format.
# It features level and predictor arguments.
# The chosen level is the maximum of 9, so that our files are small.
# The predictor is 3 to work better with floating point numbers (which the shakemaps are).
"compress": "deflate",
"zlevel": 9,
"predictor": 3,
if self.site_model.cross_antimeridian:
# The code so far defines a transformation on the left lower
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment