Dissolve (merge geometries) - ObjectVision/GeoDMS GitHub Wiki
Configuration examples Dissolve
Dissolving is the process of merging detailed polygon geometries in larger polygon geometries by removing interior segments.
In the GeoDMS this can also be done based on a relational attribute to make polygons for each entry of the domain unit of this relational attribute.
container dissolve
{
unit<float32> meter := baseunit('meter', float32);
unit<fpoint> point_rd_base;
unit<fpoint> point_rd :=
range(point_rd_base, point(300000[meter],0[meter]), point(625000[meter],280000[meter]));
unit<uint32> municipality
: StorageName = "%SourceDataDir%/CBS/2017/gem_2017.shp"
, StorageType = "gdal.vect"
, StorageReadOnly = "True"
{
attribute<point_rd> geometry (polygon);
attribute<string> name;
attribute<string> regionname;
attribute<region> region_rel := rlookup(regionname, region/values);
}
unit<uint32> region := unique(municipality/regionname)
{
attribute<point_rd> geometry (polygon) := geos_union_polygon(municipality/geometry, municipality/region_rel);
}
}
The example presents two domains: municipality and region. A relation is configured (region_rel) relating the municipality domain unit to the region domain.
The actual dissolving is done in the line configuring the region geometry. The geos_union_polygon function is used to dissolve the geometries of the municipalities for each region.