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.

example

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);
   }
}

explanation

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 bold line. The geos_union_polygon is used to dissolve the geometries of a municipality for a region.

⚠️ **GitHub.com Fallback** ⚠️