Question

RasterExpressionEvaluator result issue

  • 15 December 2016
  • 4 replies
  • 1 view

Hello everyone,

I need help to understand what’s wrong with my workbench. I’m trying to calculate an expression between two rasters.

To explain the data, I’ve got 2 GEOTIFF with the same projection, the same cells number and the same NoData value :

  • TELECOM containing pixels values 1 or 0 (signal coverage or not, 0 as NoData)
  • POPULATION containing inhabitants value or 0 (NoData)

Here is my workbench :

After execution, the Data Inspector result window :

The result seems to be wrong for 2 reasons :

  • When I click on the cell value for each raster, I’ve got this result
    • Light gray : POPULATION (pixel value 0.68)
    • Dark gray : TELECOM (pixel value 1)
    • Black : RESULT (pixel value 0 NoData)…But 1*0.68 is not 0
  • There is a gap between the source and the result data in the west side of the layer
    • Light gray : RESULT
    • Dark gray : POPULATION

Am I missing something ?

Thanks in advances.

Aymeric


4 replies

Userlevel 2
Badge +17

Hi Aymeric,

This does seem like quite unexpected behavior. Would you mind sharing your source data and workspace with us? Please email the workspace to support@safe.com, with Attn Dave in the subject line.

Kind regards,

Dave Campanas

Userlevel 2
Badge +17

Hi @aymfr17,

  1. In my experiences, the RasterExpressionEvaluator could generate such an unexpected value if the source rasters have Nodata definition. Try removing Nodata from the source rasters beforehand with the RasterBandNodataRemover. You can restore Nodata definition after the calculation with the RasterBandNodataSetter if necessary.
  2. It's unclear that the gap has been caused by the RasterExpressionEvaluator. Check if the the extents of the two source rasters are exactly same, without cell value calculation.

Hi Aymeric,

This does seem like quite unexpected behavior. Would you mind sharing your source data and workspace with us? Please email the workspace to support@safe.com, with Attn Dave in the subject line.

Kind regards,

Dave Campanas

Thank you for your quick answer Dave.

 

It's not necessary. Takashi already found what was wrong with my data!

 

 

Kind regards,

 

 

Aymeric

 

Hi @aymfr17,

  1. In my experiences, the RasterExpressionEvaluator could generate such an unexpected value if the source rasters have Nodata definition. Try removing Nodata from the source rasters beforehand with the RasterBandNodataRemover. You can restore Nodata definition after the calculation with the RasterBandNodataSetter if necessary.
  2. It's unclear that the gap has been caused by the RasterExpressionEvaluator. Check if the the extents of the two source rasters are exactly same, without cell value calculation.
Thank you Takashi, everything's working fine now!

 

 

You're right, the two raster extents were slightly different causing this gap (removing the NoData maked it appear).

 

If somebody encounter the same issue :

 

- Clip the smallest raster by the BoundingBox of the biggest one (BoundingBoxReplacer)

 

- Resample the biggest to fit the smallest (RasterResampler)

 

 

Kind regards,

 

 

Aymeric

 

Reply