Skip to main content
Question

data from raster in a polygon


Hello,

I'm new in FME and I want to put, in a polygon, the minimum value (from a raster) in this polygon inside this polygon.

 

 

 

 

I use :

"RasterToPolygonCoercer" to extract data,

"AreaOnAreaOverlayer" to transfert data to polygon.

But I cannot think how to do this.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • May 20, 2020

Have you tried clipping the raster with the polygon, then using a rasterstatistics calculator on the resulting clipped raster to get the minimum?


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 20, 2020

@ebygomm has the right approach. You want to have a unique id on the polygons, if they don't already have one, you can use a Counter to create one. On the clipper, merge attributes. After the RasterStatisticsCalculator use a FeatureMerger/FeatureJoiner to join the band0.min value back to the original polygons based on the unique id.


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • May 20, 2020
jdh wrote:

@ebygomm has the right approach. You want to have a unique id on the polygons, if they don't already have one, you can use a Counter to create one. On the clipper, merge attributes. After the RasterStatisticsCalculator use a FeatureMerger/FeatureJoiner to join the band0.min value back to the original polygons based on the unique id.

I normally store the geomety as an attribute with a geometryextractor then rebuild after with a geometryreplacer. Feels a bit neater than the featuremerger.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 20, 2020
ebygomm wrote:

I normally store the geomety as an attribute with a geometryextractor then rebuild after with a geometryreplacer. Feels a bit neater than the featuremerger.

That's an idea. I will need to do some performance tests to see which scenarios are better for which approach.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings