Skip to main content
Question

find area % within a grid


curtisd54
Contributor
Forum|alt.badge.img+4

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

liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • April 24, 2024

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.
 


curtisd54
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • April 24, 2024

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


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • April 24, 2024

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


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