Search code examples
geospatialgeogeodms

In GeoDMS, how can I transform string coordinates to dpoint?


I have problems converting coordinates in string format to dpoint format in GeoDMS GUI version 7.177.

I'm trying to read the BAG (basisadministratie gemeenten, Dutch municipality administration, a giant geo file) into GeoDMS directly from the Kadaster. It's first been converted from .xml into .csv, then the shapes of the buildings have been transformed in a format seemingly the same as the Vesta format, e.g.:

{5:{249943.307,593511.272}{249948.555,593512.791}{249946.234,593520.809}{249940.987,593519.29}{249943.307,593511.272}}

I am able to read the transformed CSV file into GeoDMS, then also able to write it as strings to .dmsdata format for speed and load it from there into GeoDMS again. However, when wanting to transform the strings into coordinates, I get the error

DPoint Error: Cannot find operator for these arguments:
arg1 of type DataItem<String>
Possible cause: argument type mismatch. Check the types of the used arguments.

My GeoDMS code looks like

unit<uint32> altBag:
    storageName     = 'c:/zandbak/output/bagPND.fss'
,   storageReadOnly     = 'true'
,   dialogType      = 'map'
,   dialogData      = 'geometry'
{
    attribute <string>  pandGeometrie; // works and looks good
    attribute <dpoint>  geometry := dpoint(pandGeometrie); // doesn't work, error above
    attribute <rdc>     geometry2 := pandGeometrie[rdc]; // doesn't work either
}

Is there a way to do this? Or is string to dpoint (or another type of point) unsupported and should I transform the CSV to shape file first?


Solution

  • you can try this:

            attribute<dpoint> Geometry(poly) :=  dpolygon(GeometryStr);
    

    and if a specific projection is required:

            attribute<rdc_meter> Geometry2(poly) :=  value(GeometryStr, rdc_meter);