Export primary data - ObjectVision/GeoDMS GitHub Wiki

User Guide GeoDMS GUI - export primary data

activate export

Source data and model results can be exported to different formats. Select a data item in the TreeView and choose the menu option Export Primary Data. The option is available on a data item or on a container with direct data items.

The following dialog then appears (here for a container with neighborhood data).

Vector/Raster

The dialog has two tabs, Vector and Raster. The dialog shows the tab that fits the domain unit of the data items to export:

Both tabs work in a similar way.

You can set the following options:

  • Foldername: the folder to which the data is exported, in one or multiple files. Use the button to select a folder, or type its name in the text box. By default the folder is the LocalData folder of the project (the %localDataProjDir% placeholder) followed by the path of the exported item.
  • Filename (no extension): the part of the filename without the file extension. Some formats (e.g. ESRI Shapefile) write multiple actual files in one export, which is why you set the name without extension here. The Resulting filename(s) box in the dialog shows the actual files that will be written.
  • Format: select the format from a combobox. The choice is based on the characteristics of the data.
  • Use native driver: for some formats, both a native GeoDMS StorageManager and a GDAL driver can export the data. Check the box to use the native driver, or uncheck it to use the GDAL driver. In some cases only one option is available, and you cannot change the setting. The checkbox starts ticked for every format that has a native driver. Once you tick or untick it for a format, it stays that way for the rest of the GUI session.

Press the Export button to export the data.

what is exported

An export writes the feature attribute of the selected table plus all its other attributes of the same domain unit. For an ESRI Shapefile these are the .shp and the .dbf. For a geopackage they are the geometry and the attribute columns of the layer. This also holds when the item you select is the feature attribute.

The feature attribute is the obvious item to select when the domain unit has no map relation. A map relation is a DialogType = "map" with a DialogData naming the feature attribute, or a sub-item named literally geometry. Without one, the other attributes of the table open as a table, and the feature attribute is the only item that opens as a map. The map relation is worth configuring for other reasons (see DialogData), but a complete export does not need it.

a failed export

When an export fails, the dialog shows an error box that names the reason. The dialog stays open, so that you can correct a setting and try again. The eventlog shows which item failed and why.

This also holds for a CSV export with Use native driver ticked, of a table or a container of tables in which an attribute cannot be computed. The file of a table is created only after all its attributes have been computed. So a table that fails leaves an earlier export of it unchanged. In a container of tables, the tables before the failing one have been written, and the tables after it have not.