### Description

For each polygon in a ‘zonal’ polygon dataset that defines the area over which a summary is to be made, this tool summarizes a thematic or continuous attribute field in another polygon dataset and writes the results to the attribute table of the zonal polygon dataset. Examples of zonal polygon data include sampling plots, counties, school catchment areas, watershed, etc. The other polygon data contains the data in an attribute field. Examples of continuous data include soil pH in a soils dataset or population size in a census dataset. Examples of thematic (categorical or ordinal) data include landcover code or zoning code.

For continuous data this tool creates a statistical summary of the field including the area-weighted mean (AWM), minimum (MIN), maximum (MAX), and area weighted sum (AWS). If you only need a subset of these statistics then you can use the optional awm, min, max and aws parameters to enable/disable reporting of each of these summary statistics. It is unlikely that all four summary statistics will be appropriate for any particular analysis. By default all four are enabled. For thematic data, the tool reports the area of each category present in the zonal polygon. Because the tool cannot automatically distinguish between continuous and thematic data, you must use the ‘thematic’ parameter if you wish to obtain the thematic summary; by default the tool assumes that the field represents continuous data. For thematic summaries you also have the option of reporting the proportion of the zonal polygon occupied by each category rather than the area (see the ‘proportion’ parameter).

If v is the continuous value specified by the ‘field’ parameter, c is the area of the (clipped) continuous data polygon falling within the zonal polygon, and A is the total area of the (unclipped) continuous data polygon, then the area weighted mean is calculated as sum(v*c)/sum(c), and the area weighted sum is calculated as sum(v*c/A). In these formulae sum iterates over the set of polygons that overlap that zonal polygon.

### Syntax

isectpolypoly(in, poly, field, prefix, [thematic], [proportion], [where], [awm], [min], [max], [aws]);

in | the input zonal polygon data source | |

poly | the polygon data source containing the quantitative data to summarize | |

field | the field in this second polygon layer to process | |

prefix | a short prefix to use in the summary statistic fields that are added, which end with AWM, MIN, MAX for continuous data, and V# for thematic data where # is each of the unique values. The prefix should be no longer than 6 characters. | |

[thematic] | (TRUE/FALSE) controls whether the polygon data should be treated as thematic (categorical) (default=FALSE) | |

[proportion] | (TRUE/FALSE) only applies to thematic data: records the proportion of the polygon in each unique value instead of the area of the polygon (default=FALSE) | |

[where] | the filter/selection statement that will be applied to the first (‘in’, not ‘poly’) polygon feature class to identify a subset of polygons to process | |

[awm] | (TRUE/FALSE) applies only to statistical summaries, if false, the area weighted mean statistic is not added to the attribute table (default=TRUE) | |

[min] | (TRUE/FALSE) applies only to statistical summaries, if false, the minimum statistic is not added to the attribute table (default=TRUE) | |

[max] | (TRUE/FALSE) applies only to statistical summaries, if false, the maximum statistic is not added to the attribute table (default=TRUE) | |

[aws] | (TRUE/FALSE) applies only to statistical summaries, if false, the area weighted sum statistic is not added to the attribute table (default=FALSE) |

### Example

isectpolypoly(in=”C:datafields.shp”, poly=”C:datasoils.shp”, field=”SOILTYPE”, prefix=”SOIL”, thematic=TRUE);

isectpolypoly(in=”C:dataplots.shp”, poly=”C:datalcov.shp”, field=”LANDCOVER”, thematic=TRUE, proportion=TRUE);

isectpolypoly(in=”C:datacounties.shp”, poly=”C:datacensus.shp”, field=”POPSIZE”, awm=FALSE, min=FALSE, max=FALSE, aws=TRUE);