Skip to main content
Solved

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

  • April 30, 2018
  • 2 replies
  • 189 views

fmelizard
Safer
Forum|alt.badge.img+20

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • 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+11

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.