AtomicRegions - ObjectVision/GeoDMS GitHub Wiki
discrete_alloc function, argument 6: AtomicRegions
AtomicRegions is the sixth argument of the discrete_alloc function.
AtomicRegions is a domain unit defining the set of atomic regions.
It contains attributes for each PartioningAttribute that define to which region each atomic region belongs for that PartioningAttribute.
The overlay function is used to derive an AtomicRegions unit with the set of relevant subitems for the discrete_alloc function, see the example.
unit AtomicRegions with value types:
The names of the regions (subitems of the third argument of the overlay function) need to match with the values of the PartioningName argument.
Since GeoDMS 20.23.1 the range of AtomicRegions, and the range of the values unit of each of its partitioning attributes, must start at 0, as their ids are used as indices; the allocation functions stop with the atomic region unit must have a range that starts at 0 or the region unit of partitioning ... must have a range that starts at 0. Before, a unit such as range(uint16, 1, N+1) gave a wrong allocation without a message, see discrete_alloc.
unit<uint8> lu_type: nrofrows = 3
{
attribute<string> PartioningName: ['Living','Working','Nature'];
}
container regionSets
{
attribute<regMaps/p1> Nature (DomainGrid) := regMaps/p1Map;
attribute<regMaps/p1> Living (DomainGrid) := regMaps/p1Map;
attribute<regMaps/p2> Working (DomainGrid) := regMaps/p2Map;
}
unit<uint16> AtomicRegions := overlay(lu_type/PartioningName, DomainGrid, regionSets);