Skip to main content
Solved

How to use the feature extents as an environment variable for processing?


Forum|alt.badge.img

I am using FME 2017 and would like to carry out a relatively simple geoprocessing task. I have DEM TIF tiles and DOM TIF tiles in 2 different directories which both have the same names and the same extents. I would like to subtract the DEM from the DOM for each tile and save the new tile in a 3rd directory named "NORMALIZED".

So my process is simply the following:

1. Iterate through Directory "DOM" and for each filename find and subtract the same file in directory "DEM".

2. Save the result in Directory "NORMALIZED"

 

How would I achieve this?

Best answer by hollyatsafe

Hi @robertdbuckley,

If you are looking to subtract the value of the DOM tile from the DEM file then you should be able to use the RasterCellValueCalculator transformer. If they have the same file name I think you can use the 'group by' parameter to process these all at once and then write they out to your NORMALIZED directory.

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

4 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 4, 2018

@robertdbuckley

You don't have to iterate, though might be wise if the files are very large.

You can merge on the filenames (which are the same as you stated).

And run the process on the merged port.

(Use directory and file reader with a featurereader for instance. Or 2 dynamic readers.)


Forum|alt.badge.img+2
  • Best Answer
  • July 4, 2018

Hi @robertdbuckley,

If you are looking to subtract the value of the DOM tile from the DEM file then you should be able to use the RasterCellValueCalculator transformer. If they have the same file name I think you can use the 'group by' parameter to process these all at once and then write they out to your NORMALIZED directory.


Forum|alt.badge.img
hollyatsafe wrote:

Hi @robertdbuckley,

If you are looking to subtract the value of the DOM tile from the DEM file then you should be able to use the RasterCellValueCalculator transformer. If they have the same file name I think you can use the 'group by' parameter to process these all at once and then write they out to your NORMALIZED directory.

 

This is exactly what I was looking for! Thanks. But I would still be curious to know how I could do the same using list indexes. :-)

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • July 4, 2018

Hi @robertdbuckley,

I have attached a workspace that uses the FeatureReader and RasterExpressionEvaluator to do the subtraction on an entire folder of TIF files, outputting a separate TIF for each DEM/DOM pair.

batchsubtractgeotiff.fmw


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