Write data - ObjectVision/GeoDMS GitHub Wiki

Data is written to a storage with a StorageManager if:

  • At least the StorageName property is configured to a data item or it's parent item. Often, other StorageManager properties are also needed/useful.
  • The StorageManager supports writing data.
  • An expression is configured for the data item or derived from its parent item.
  • The property DisableStorage is not configured or set or set to false (default value).
  • The property StorageReadOnly is not configured or set to false (default value).
  • For GeoDMS versions since 17.x.x, the property StorageType = "" needs to be set explicitly to write. Recommended settings are StorageType = "gdalwrite.grid" and "gdalwrite.vect" for grids and vectors, respectively. For the native tif-driver set it to "tif".

The last two properties work hierarchically. If configured to a parent item, they also apply to each of their subitems. They can be overruled for specific subitems.

example

Native tif-driver:

attribute<bool>   Make_per_AdminDomain      (AdminDomain) := IsDefined(poly2grid(WindBuffer, AdminDomain))
, StorageName = "%LocalDataProjDir%/BaseData/Grondgebruik/BGT/IsAutoWegBuffer.tif"
, StorageType = "tif";

Gdal tif-driver:

attribute<bool>   Make_per_AdminDomain      (AdminDomain) := IsDefined(poly2grid(WindBuffer, AdminDomain))
, StorageName = "%LocalDataProjDir%/BaseData/Grondgebruik/BGT/IsAutoWegBuffer.tif"
, StorageType = "gdalwrite.grid";

Gdal vector-driver:

unit<uint32> Municipalities := SomeOtherUnit
, StorageName = "%LocalDataProjDir%/BaseData/Municipalities.shp"
, StorageType = "gdalwrite.vect"
{
   attribute<rdc>   geometry (poly) := SomeOtherUnit/geometry;
}

Container RegionSets
, StorageName = "%LocalDataProjDir%/BaseData/RegionSets.gpkg"
, StorageType = "gdalwrite.vect"
{
   unit<uint32> Municipalities := SomeOtherUnit   
   {
      attribute<rdc>   geometry (poly) := SomeOtherUnit/geometry;
   }
}

unit<uint32> Municipality_Data := Municipalities 
, StorageName = "%LocalDataProjDir%/BaseData/Municipalities.csv"
, StorageType = "gdalwrite.vect"
{
   attribute<uint32>   nr_inhabitants := Municipalities /nr_inhabitants;
}

file and folder

The StorageName property configures both the folder and the file name for the export. If the item for which the StorageName is configured is updated, the resulting storage will be made. We suggest always configuring both folder and file names. If no folder is configured, the storage will be written to your %ConfigDir%. If no file is configured, an error is generated.

Since GeoDMSVersion 7.140, you can also add the %configname% placeholder to your folder name. This is useful if your project consists of multiple configurations (e.g. Vesta).

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