Skip to main content
Solved

How to filter out raster (tiles) that contain only nodata?


fmelizard
Safer
Forum|alt.badge.img+18

I'm using RasterTiler to create tiles from a larger raster. However, I noticed many resulting tiles contains only nodata values. How can I avoid writing out these tiles.

Best answer by jdh

If you use the RasterBandMinMaxExtractor, you can test if both the min and max values equal the nodata value.

View original
Did this help you find an answer to your question?

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • April 30, 2018

If you use the RasterBandMinMaxExtractor, you can test if both the min and max values equal the nodata value.


xiaomengatsafe
Safer
Forum|alt.badge.img+3

If you know what the Nodata values are in different bands, you can use the RsaterBandMinMaxExtractor to extract the min and max values of each band, and then using a Tester to filter out tile features whose min and max cell value both equal the no data value of that band.

 

e.g.

 

If nodata for an numeric raster is -9999, the following test will output nodata tiles as passed:

 

_band{0}.min = -9999

 

AND

 

_band{0}.max = -9999

So, only connect the Failed port to the writer will give you the desired result.


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