Hello, I need to use FME to do some custom cellwise manipulation of different rasters.
I am quite new to FME, but so far my plan is to import rasters using a GeoTIFF reader and then doing custom manipulations in a PythonCreator transformer. Ideally I would like to be able to do operations equivalent to manipulating an numpy array, but I obviously realise that the operations do differ.
So far I have gathered that you can access different bands in rasterdata by using getBand(), however I am uncertain in regards to how you go about accessing the data itself and further, how you can change individual values and so on. I have also read up on tiles, and seen examples such as " prevData = prevRaster.getBand(0).getTile(0, 0, tile).getData() " (by @takashi), but I am not confident in exactly how to change individual datapoints within the raster.
And as a side question, what is the best/preferred way to troubleshoot code to be used in an PythonCreator?
G_Dal can target by row and column (cellwise targeting). Though fme seems not to offer this even if they use g-dal.
There is a python package for it PyPi wich can be downloaded from Pypi.org.
If you need to use python for some custom manipulations, etc., you might consider using a PythonCaller rather that the PythonCreator. The PythonCreator won't have an input port for you to connect to you GeoTIFF Reader.
Let us know how you make out and if you have any further questions.