FME – Raster to polygon

Posted on 15 February 2010

The last couple of weeks i have been working on a raster to vector conversion in FME, and thought it would be nice to share my experiences here at my blog. This might be the start to a FME special series here at the blog with short explanations of different topics within FME. To read this raster to vector special click the read more link below.

What i wanted to do was to create polygons representing each of the rastercells, and extract the value from the raster and copy this value to the attribute table of the polygon.

I started off importing the raster to my workspace. One could also do this as a batch operation, importing multiple rasters.
To convert the raster cell to polygon i used the the ‘RasterCellCoercer’. This transformer decomposes each of the raster features into individual points or polygons. However, the transformer does not extract the value, even when enabling the “preserve attributes” option.
To be able to extract the value from each of the raster cells into an attribute i used the transformer ‘ElevationExtractor’. This tool extracts the z-value from each of the raster cells into a defined attribute. The default is “_elevation”.
That is basically it. You can now add your output writer and add the user attribute you want to store the raster cell value from the “_elevation” attribute. Remember that your output feature must be equal to either the point or polygon option that you selected in the ‘RasterCellCoercer’.
If you have selected multiple rasters, you could write each out to its original filename using fanout by “fme_basename”.
Here is my workspace:


No responses yet. You could be the first!

Leave a Response

You must be logged in to post a comment.

Recent Posts

Tag Cloud

Animation ArcGIS ArcGIS 9.4 ArcGIS 10 ArcGIS X Basemap Border Changes CIESIN Conference Conflict Crisis mapping Elevation Maps ESRI ETL FME Free Maps Geographic Information Systems Geoprocessing GIS GIS blog Gis intersect GISintersect.com GIS News GME Hawths Tools Historical Maps New Data Open Street Map Peace Political Maps Python R Reference Maps Road data Safe Software Science SEDAC Spatial Spatial Analysis Special Issue State borders street Transformers Video WMS

Meta

GISintersect.com – GIS Blog is proudly powered by WordPress and the SubtleFlux theme.

Copyright © GISintersect.com – GIS Blog



Google Analytics integration offered by Wordpress Google Analytics Plugin