Skip to main content
Question

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

  • February 13, 2019
  • 2 replies
  • 142 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

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • February 13, 2019

Try a raster resampler


  • February 13, 2019

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings