Question

find area % within a grid

  • 24 April 2024
  • 3 replies
  • 40 views

Badge +3

Hello All,

I want to complete this in FME similar to how I did it in ArcPro below using Select by Location 

  1.  
  • Calculating the percentage of  area in each Grid
  • Determine the number of  pixels within each grid
  • Calculate the % of  areas within each grid by dividing the number of pixels by 111 111 and multiplying by 100
  • Generate the density map with density classes: 7 categories
  • Example: if the grid has 35 000  pixels, then the percentage is 31.50%

thanks!

 

 


3 replies

Userlevel 4
Badge +13

You can use 2 AreaCalculators, one for the grid polygons and another for the other polygons. Then you should be able to use any number of transformers (AttributeManager, AttributeCreator, ExpressionEvaluator) to calculate the percentage using the two area results from the AreaCalculators. You could again use an AttributeManager or AttributeCreator to create a new attribute to categorize the densities into 7 groups, which you can then use in the writer to write out the data into the 7 different featureclasses.
 

Badge +3

sorry if i didnt explain well enough .

 

I have the area for grid polygons and other polygons.  

 

What I need is to Determine the number of  pixels (records) in the gridcode (dataset)  within each grid 10x10km (13995)

then once I have that number,

I need divide the number of pixels (records) by 111 111 and multiplying by 100 to find the %

 

I think a spatialrelator transformer  might work , just not sure how to set it up

Userlevel 4
Badge +18

Put the Grid into the Requestor and the pixels into the Supplier. Set the spatialRelator to Intersect or Contains or something. Fill in a name for an attribute in the Related Suppliers Count.

This attribute will tell you how many Suppliers (pixels) there are in the Requestor (Grid).

If this is not what you need, could you provide a bit of insight in what your current workbench looks like and what your current result looks like.

 

Reply