Under version 3.2 of gdal, we were running a program to build mrf files using the following commands
self.outRaster = self.mrfDriver.Create( mrfFileName, self.config["numCols"], self.config["numRows"], 1, # number of bands, R G B self.config["dataType"], options=[ "Zsize={:d}".format(zSize), "UNIFORM_SCALE=2", # space for overviews self.config["MRF-OPTIONS"], "COMPRESS=LERC", "BlockSize={}".format(self.config["TILESIZE"]),
*the MRF-OPTIONS from our config file are "OPTIONS=V2=ON LERC_PREC=0.0001"
We recently updated to gdal 3.4.2 and have consistently received the error:
`Traceback (most recent call last):
File "/opt/anaconda3/envs/gdalenv/lib/python3.9/multiprocessing/pool.py", lin
e 125, in worker
result = (True, func(*args, **kwds))
File "/opt/anaconda3/envs/gdalenv/lib/python3.9/multiprocessing/pool.py", lin
e 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/home/arcgis/gis-project/src/master.py", line 65, in execute_task
gdalMrf.driver(dtg, doy)
File "/home/arcgis/gis-project/src/mrf.py", line 468, in driver
self.run_day(mrfDataPath, year, doy)
File "/home/arcgis/gis-project/src/mrf.py", line 347, in run_day
self.mrf_3d_files(mrfDataPath, sliceNumber, year, doy)
File "/home/arcgis/gis-project/src/mrf.py", line 253, in mrf_3d_files
self.create_mrf(
File "/home/arcgis/gis-project/src/mrf.py", line 128, in create_mrf
self.outRaster = self.mrfDriver.Create(
File "/opt/anaconda3/envs/gdalenv/lib/python3.9/site-packages/osgeo/gdal.py",
line 2001, in Create
return _gdal.Driver_Create(self, *args, **kwargs)
RuntimeError: GDAL MRF: Error setting compression
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/arcgis/gis-project/src/master.py", line 150, in
main(params)
File "/home/arcgis/gis-project/src/master.py", line 95, in main
res = pool.starmap(execute_task, inputData)
File "/opt/anaconda3/envs/gdalenv/lib/python3.9/multiprocessing/pool.py", lin
e 372, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/opt/anaconda3/envs/gdalenv/lib/python3.9/multiprocessing/pool.py", lin
e 771, in get
raise self._value
RuntimeError: GDAL MRF: Error setting compression`
Any assistance in enabling LERC compression under the new version would be appreciated. Let me know if more information or explanation is required.