Skip to main content
Solved

Geodatabase raster nodata


Forum|alt.badge.img

I have a raster dataset stored in a file geodatabase and when I read this into a workbench the nodata bit masks for each band are merged into a single additional alpha band named geodb_nodata as default and stated in the help documentation.

When I view the grid in the inspector Band 0 contains data values and a value of 0 or -3.40282e+38 for nodata cells. Band 1 (ALPHA8): geodb_nodata contains a value of 0 for nodata and 255 for cells containing data.

My question is how can I set the values in Band 0 as nodata using Band 1 (ALPHA8)?

I assume it's a combination of using the RasterSelector with the RasterBandNodataSetter transformers, but no combination has worked for me so far.

Specifically, I want to set the values in Band 0 to nodata using Band 1 and then sending the output to a RasterCellCoercer transformer to create points for all raster cells containing a value i.e. excluding nodata cells.

Thanks

Best answer by jamess

After some more trial and error I have a solution using a RasterExpressionEvaluator followed by a RasterBandNodataSetter. The expression I've used is if(A[1] == 255,A[0],-9999) then I use the RasterBandNodataSetter to set -9999 values as NoData. This works ok, but it would be tidier to set NoData directly in the RasterExpressionEvaluator if possible.

 

 

I'd be interested in hearing other suggestions and workflows.

 

 

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

2 replies

Forum|alt.badge.img
  • Author
  • Best Answer
  • March 27, 2018
After some more trial and error I have a solution using a RasterExpressionEvaluator followed by a RasterBandNodataSetter. The expression I've used is if(A[1] == 255,A[0],-9999) then I use the RasterBandNodataSetter to set -9999 values as NoData. This works ok, but it would be tidier to set NoData directly in the RasterExpressionEvaluator if possible.

 

 

I'd be interested in hearing other suggestions and workflows.

 

 


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 27, 2018
jamess wrote:
After some more trial and error I have a solution using a RasterExpressionEvaluator followed by a RasterBandNodataSetter. The expression I've used is if(A[1] == 255,A[0],-9999) then I use the RasterBandNodataSetter to set -9999 values as NoData. This works ok, but it would be tidier to set NoData directly in the RasterExpressionEvaluator if possible.

 

 

I'd be interested in hearing other suggestions and workflows.

 

 

Hi @jamess,

 

 

Thanks a lot for sharing your results with us on this workflow. It's a tricky problem here because like you've no doubt discovered the are essentially two no data values coming in from the raster here (0 and -3.40282e+38). I think the workflow you have suggested is the best workaround for this. While it seems convoluted I think it is a good approach to this particular problem.

 


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