overlay
- Details
- Last Updated on Monday, 21 January 2013 16:43
syntax
- overlay(a, b, c)
definition
overlay(a, b, c) results in a new uint16 domain unit. A subitem UnionData is generated for this domain unit, containing different index numbers of this domain unit for each unique combination of the occuring values in the source attributes. Attribute a contains the names of the source attributes. These attributes need to be configured in container c. Argument b is the domain unit of the source and the resulting attributes.
description
The overlay function is e.g. used to create unique regions in the discrete allocation function, used in amonst others the Land Use Scanner.applies to
Attribute a with value type:
- string
Domain unit b with value type:
- group: CanBeDomainUnit
conditions
All attributes to be overlayed need to match with regard to their domain unit. Null values are not allowed in the source attributes.since version
5.51
example
unit<uint8> OverlayRegios: nrofrows = 2
{
attribute<string> namen: ['NoordZuid', 'OostWest'];
}
container OverlayGrids
{
attribute<uint8> NoordZuid (GridDomain)
: StorageName = "%projdir%/data/overlayNZ.asc";
attribute<uint8> OostWest (GridDomain)
: StorageName = "%projdir%/data/overlayOW.asc";
}
unit<uint16> NoordZuidOostWest
: expr = "overlay(OverlayRegios/namen, GridDomain, OverlayGrids)";
NoordZuid:
| 0 | 0 | 0 | 0 | 0 | |
| 0 | 0 | 0 | 0 | 0 | |
| 1 | 1 | 1 | 1 | 1 | |
| 1 | 1 | 1 | 1 | 1 | |
| 1 | 1 | 1 | 1 | 1 | |
OostWest:
| 0 | 0 | 0 | 1 | 1 | |
| 0 | 0 | 0 | 1 | 1 | |
| 0 | 0 | 0 | 1 | 1 | |
| 0 | 0 | 0 | 1 | 1 | |
| 0 | 0 | 0 | 1 | 1 | |
NoordZuidOostWest/UnionData:
| 0 | 0 | 0 | 2 | 2 | |
| 0 | 0 | 0 | 2 | 2 | |
| 1 | 1 | 1 | 3 | 3 | |
| 1 | 1 | 1 | 3 | 3 | |
| 1 | 1 | 1 | 3 | 3 | |