Search code examples
buffergeospatialgeodms

In GeoDMS, I am trying to buffer a polygon but I get an error


In GeoDMS I want to buffer a polygon set with 5 meters, but I get an error:

polygon_i4D Error: Cannot find operator for these arguments:
arg1 of type DataItem<FPolygon>
arg2 of type DataItem<Float64>

Can someone help me with this issue?

unit<uint32> shapes 
:   StorageName     = "%SourceDataDir%/CBS/bevolkingskern_2011.shp"
,   StorageType     = "gdal.vect"
,   StorageReadOnly = "True"
,   FreeData = "False" 
,   SyncMode = "None" 
{
    attribute<geometries/rdc> geometry (poly) ;
    attribute<geometries/rdc> buffer (poly)          := polygon_i4D(geometry, 5d);
}

Solution

  • The configured expression for the buffer attribute results in an inflated polygon.

    Use the - operator to find the buffer (the inflated area but not the original area), for example:

    attribute<geometries/rdc> buffer :=
       value(polygon_i4D(ipolygon(geometry), 5d) - ipolygon(geometry), geometries/rdc);