Skip to main content

@takashi As you have probably worked out I'm fairly new to more than push button FME. This should be really simple and probably is but I want to expose a numeric raster band value and create an attribute from it so that when I covert the raster to polygons I have the value as an attribute of the polygons. I have tried using attribute creator but can't work out the syntax. This leads on to another probably basic and related question: I want to replace values in a raster based on ranges of numbers - eg 0-12 becomes 12 and more than 12 but less than 20 becomes 20, etc. I can string together multiple instances of RasterCellReplacer to approximate this but there must be a more efficient way using RasterExpressionEvaluator for example. Again my syntax to do this is lacking. Any resources for a self-taught FME'r on that front that start at the basics?

Hi @garethgis, "_band{0}.value" seems to be an element of a list attribute which will be created with a RasterCellCoercer, but I don't think the transformer is used in your workspace, as far as I see your screenshots.

If you need to extract individual cell values as feature attributes, consider using the RasterCellCoercer.

Alternatively, if your final goal is to create polygons each of which merged consecutive cells having the same value, the RasterToPolygonCoercer could be more efficient to accomplish the goal.


Hi @garethgis, "_band{0}.value" seems to be an element of a list attribute which will be created with a RasterCellCoercer, but I don't think the transformer is used in your workspace, as far as I see your screenshots.

If you need to extract individual cell values as feature attributes, consider using the RasterCellCoercer.

Alternatively, if your final goal is to create polygons each of which merged consecutive cells having the same value, the RasterToPolygonCoercer could be more efficient to accomplish the goal.

Some of the FME tools that look logical just seem a bit of a deadend. I'd have thought that the attribute creator would logically be a reasonable way forward and working on the raster logically faster than converting every pixel to a polygon or point first. The RasterCellCoercer looks like it has the band exposer option while the raster2polygon tool has zero options and didn't automatically bring the band info through to the polygons so I guess its Coercer then merge polygons?

 

 


Reply