Advanced Raster Cell Value Calculation

Related products: FME Form

Existing transformers such as the RasterExpressionEvaluator only perform per-cell calculation. The user will have to make some efforts if a calculation using multiple cell values was required. e.g. the average of 8-neighbor cell values. It may not be impossible in the current FME framework, but would be complicated and inefficient.
I hope that a new transformer will be introduced, so that the user can define a script to perform advanced cell value calculations efficiently. In the script, the user can:
- retrieve the value of any cell in any band,
- refer to the raster properties,
- use control statements (for, while, if, etc.),
- assign the resulting value to a cell of an existing band or new band (which can be added by the transformer),
and so on.
Perhaps it would be a kind of Python script editor/executor customized for raster operation.
Agreed. I also think that something relatively simple like allowing the expression to be passed in an attribute would go a long way. That would enable dynamic expressions, e.g. based on the number of bands in each raster.

Some different transformers might be considered according to the calculation complexity and user's skill. As you suggested in other post, adding raster support to the fmeobjects module is also nice, so that users can manipulate everything about raster :)


definitely useful for remote sensing applications


I found a relatively efficient way to calculate sum and average of neighborhood, and published a custom transformer named 'RasterCellNeighborSummer' in the FME Hub. Although the ability is limited, it might be helpful to some scenarios until this idea will be realized.


Hi guys, I agree. Has something been realized yet? Im trying to transform raster cell values into binary coded values.


The closest is that you can now pull raster geometry into python and do your analysis there.

 

 


Safe PR#24574


Yess, the Moving Window analysis 🙂

Hi, something I wondered is if it is possible to do a 'scan' for a sub-sized matrix over a complete raster (to 'recognize' objects for example?) This would make things more efficient, I think.


Hi @takashi, in our FME 2018.1 betas, we've added the RasterConvolver and RasterStatisticsCalculator transformers to help our users with some of their raster translation. These two transformers can be used to perform calculations and manipulations on your raster datasets. Please try them out and let us know what you think.

Please note that this is a beta feature and its functionality and appearance are subject to change as the product continues to evolve before the official release. As with all beta features and beta versions of our software, they are not considered production-safe and should be incorporated into your workflows with consideration and testing.