NetLogo 7.0.0-beta2:

gis:apply-coverage

gis:apply-coverage VectorDataset property-name patch-variable

Copies values from the given property of the VectorDataset’s features to the given patch variable. The dataset must be a polygon dataset; points and lines are not supported.

For each patch, it finds all VectorFeatures that intersect that patch. Then, if the property is a string property, it computes the majority value by computing the total area of the patch covered by VectorFeatures having each possible value of the property, then returning the value which represents the largest proportion of the patch area. If the property is a numeric property, it computes a weighted average of property values from all VectorFeatures which intersect the patch, weighted by the proportion of the patch area they cover.

There are two exceptions to this default behavior:

  • If a percentage of a patches’ area greater than the coverage-maximum-threshold is covered by a single VectorFeature, then the property value from that VectorFeature is copied directly. If more than one VectorFeature covers a percentage of area greater than the threshold, only the first will be used.

  • If the total percentage of a patches’ area covered by VectorFeatures is less than the coverage-minimum-threshold, the target patch variable is set to Not A Number.

By default, the minimum threshold is 10% and the maximum threshold is 33%. These values may be modified using the four primitives that follow.

Take me to the full GIS Extension Dictionary