Skip to main content
Question

Difference between two DEM (rasters) in an overlap area

  • April 22, 2022
  • 6 replies
  • 366 views

Forum|alt.badge.img

I'm trying to make the difference between two DEM in an overlap area. 

Already how do I create the overlap area of the two DEM (raster) in FME. 

And how do I calculate the difference in pixel value height between raster 1 and raster 2?

 

thanks you!

6 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • April 22, 2022

This can be done using the RasterExpressionEvaluator.


Forum|alt.badge.img
  • Author
  • 9 replies
  • April 22, 2022

This can be done using the RasterExpressionEvaluator.

What do I put in the expression to get the elevation value of A minus that of B?


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • April 22, 2022

What do I put in the expression to get the elevation value of A minus that of B?

If the band is 0 then A[0]-B[0].

2022-04-22_16h37_41I attached a sample workspace.


maayke
Contributor
Forum|alt.badge.img+6
  • Contributor
  • 18 replies
  • April 22, 2022

Hi @dona​, like already suggested by @nielsgerrits​ the RasterExpressionEvaluator is the right transformer for this purpose. As an addition, however: please note that the RasterExperssionEvaluator requires two rasters with the same dimensions. Please see this thread for a sample workspace.


Forum|alt.badge.img
  • Author
  • 9 replies
  • April 25, 2022

What do I put in the expression to get the elevation value of A minus that of B?

Thanks for the template but as I have two rasters that are not the same the function is not good. My two rasters are in two different files and what I want is to calculate the difference in elevation of the two rasters in the overlapping area. 


Forum|alt.badge.img
  • Author
  • 9 replies
  • April 25, 2022

Hi @dona​, like already suggested by @nielsgerrits​ the RasterExpressionEvaluator is the right transformer for this purpose. As an addition, however: please note that the RasterExperssionEvaluator requires two rasters with the same dimensions. Please see this thread for a sample workspace.

Hi @maayke​,

Indeed, I had found this post before asking my question but I can't use the RasterExpressionEvaluator transformers only on the overlap area because I will have two rasters of the same dimension in the overlap area. Do you know how to extract the overlap area between the two rasters so that I have the same dimension and use RasterExpressionEvaluator?