Solved

How can I simulate GDAL's "Offset from zero relative to which to interpret intervals" parameter using FME Workbench for contour generation?


Badge +6

Hi,

 

I am creating contour lines and contour polygons from a raster geotiff file with 50m intervals. In lowland areas near the sea a lot of tiny lines/polygons are created wherever the elevation fluctuates around value 0-m. GDAL has a parameter (Offset from zero relative to which to interpret intervals) which allows setting an offset so as to reflect only significant low elevations (by setting it to -5 for instance). However this parameter is not present in the ContourGenerator transformer of FME.

Can you think of a workaround for simulating such behavior? Otherwise is it easy to call the GDAL function from within FME?

Thank you!

 

Best regards,

 

Olivier

icon

Best answer by redgeographics 14 July 2022, 14:38

View original

2 replies

Userlevel 5
Badge +25

I'm trying to get my head around how this works...

 

You can use the Offsetter transformer to perform the offset, then ContourGenerator and then another Offsetter to get the contours back to their proper elevations.

Badge +6

Thank you very much @Hans van der Maarel​ ! That indeed works. In the meantime I had used the RasterExpressionEvaluator for adding 5 to A[0]. I did not know that the Offsetter was also acting on Raster.👍

Reply