Solved

Calculate Statistics for Crop Types in Each Parcel


Badge +4

I have Parcel data and crop data (polygon geom). I am trying to calculate the crop type ratio for each parcel.

My plan was:

  1. Clip the crop data based on parcel
  2. Calculate statistics based on crop type and group by ParcelID

I am not getting a sufficient result.

Any help is appreciated. The workbench has been attached.

icon

Best answer by markatsafe 13 April 2020, 19:51

View original

9 replies

Badge +2

@canerakin111 can you include a small sample dataset?

Userlevel 1
Badge +21

It's hard to say without seeing the data, but my first thought is that the crop data should be the clipper and the parcels should be the clippee

Badge +4

@canerakin111 can you include a small sample dataset?

Hi Mark,

Please see the attached.

croptype.zipsampleparcel.zip

Updated

Badge +4

It's hard to say without seeing the data, but my first thought is that the crop data should be the clipper and the parcels should be the clippee

Hi,

I just published a sample data under Mark's comment. I hope this can help to describe the issue better.

Userlevel 1
Badge +21

Hi,

I just published a sample data under Mark's comment. I hope this can help to describe the issue better.

What output are you looking to get? It's not clear what statistics you are looking for - number of different crop types? Number of discrete crop types? Total area of each crop type per parcel? Crop type with the greatest area in the parcel? Largest discrete area in the parcel?

e.g. the below parcel has 3 different crop types, but 12 discrete areas of crop

 

Badge +4

What output are you looking to get? It's not clear what statistics you are looking for - number of different crop types? Number of discrete crop types? Total area of each crop type per parcel? Crop type with the greatest area in the parcel? Largest discrete area in the parcel?

e.g. the below parcel has 3 different crop types, but 12 discrete areas of crop

 

I am trying to calculate two things:

1. Each parcel have multiple crop types. I am trying to calculate the percentage of crop types for each parcel. For example, PRCL000001 has Broadleaf, vineyard and shrubland. What is the ratio of them in this parcel based on the area? The output should be something like 35% Broadleaf, 60% vineyard, 5% shrubland.

2. What is the crop type with the greatest area in the parcel? In the example above, it will be a vineyard, so I will assign this parcel vineyard.

Badge +4

is there any update with this question?

Badge +2

@canerakin111 Thanks for including the sample data. You can bundle a workspace and data using the File -> Save As Template : makes it easy to ship small examples.

I think the AreaOnAreaOverlayer and the Aggregator are the two key transformers you can use here. I've attached a small example that you can expand on: croptype-per-parcel V1.fmwt

Badge +4

@canerakin111 Thanks for including the sample data. You can bundle a workspace and data using the File -> Save As Template : makes it easy to ship small examples.

I think the AreaOnAreaOverlayer and the Aggregator are the two key transformers you can use here. I've attached a small example that you can expand on: croptype-per-parcel V1.fmwt

Thank you!

Reply