Question

Can I reduce the size of my raster at the start of my process?

  • 13 February 2019
  • 2 replies
  • 27 views

Hello,

 

 

I'm writing a workbench that downloads sentinal-1 SAR Geotiffs, reprojects, coerces that to look right, then overlays some vectors on them. The input files very is size but are about a gigabyte and I want my output to be around 5mb.

 

At the moment it is failing at the mapnik rasterizer because of 'bad allocation' which my research tells me is usually related to running out of memory.

 

 

Is there a way to compress by raster at the start of the process so it is both faster and less likely to fail?

 

 


2 replies

Userlevel 1
Badge +10

Try a raster resampler

I don't think compression will help you here as it is only applied when rasters are written. The ways I can think of to reduce the size of a raster are as follows:

 

to reduce the area covered (Clipper),

reduce the resolution (RasterResampler)

reduce the number of bands (RasterBandRemover)

reduce the size of a band (RasterbandInterpretationCoercer).

 

Which one you choose will depend upon which properties of the source raster you need to preserve in your output.

 

Reply