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 activate the menu option: Export Primary Data on a data item or a container with direct data items.

After activating the following dialog appears (in this case for a container with neighborhood data).

Vector/Raster

The dialog has two tabs, Vector or Raster. Based on the domain unit of the data items to be exported, a tab is presented:

both tabs work in a similar way.

The following options can be set:

  • Foldername: data is exported to one or multiple files, in the foldername set here. With the button a foldername can be selected or can be typed in the text box. By default the folder name is the name of your LocalDataDir placeholder and the path of the item exported.
  • Filename (no extension): as for some formats (e.g. ESRI Shapefile), multiple actual files are written in an export, in this textbox the part of the filename can be set without the file extension. The actual files that will be written are presented in the Resulting filename(s) box in the dialog.
  • Format: From a combobox a selection can be made for the format, based on the characteristics of the data. New formats can be added in the future.
  • Use native driver: for some formats, a native GeoDMS StorageManager and a GDAL driver is available to export data. With this checkbox you can indicate if you want to use the native (checked) or GDAL (unchecked) driver. In some cases only one option is available and the setting can not be changed. Since GeoDMS 20.18.0 the checkbox starts ticked for every format that has a native driver, and once you tick or untick it for a format it stays that way for the rest of the GUI session. Before, it was ticked only the first time the dialog was opened after starting the GUI and unticked on every later opening, so the same export could take a different route depending on how many times you had opened the dialog.

With the Export button the actual data is exported.

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 that is the .shp and the .dbf, for a geopackage the geometry and the attribute columns of the layer.

Since GeoDMS 20.18.0 that also holds when the item you select is the feature attribute. Before, selecting the feature attribute exported the geometry alone: a shapefile without its .dbf, or a GeoPackage layer without any attribute column. QGIS opens such a file, ArcGIS Pro refuses it. It was easy to run into without noticing, because the Resulting filename(s) box lists the .dbf either way.

You were most likely to hit this when the domain unit had no map relation — no DialogType = "map" with a DialogData naming the feature attribute, and no 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, so it is the obvious thing to select before exporting. The map relation is worth configuring for other reasons (see DialogData), but it is no longer needed to get a complete export.

A second defect had the same effect and is fixed in the same version: an ESRI Shapefile export with Use native driver ticked wrote no .dbf at all, for any selected item, in every GeoDMS release since 2023. The attributes reported Failure during Writing in the eventlog while the dialog still reported success.

a failed export now says so

Since GeoDMS 20.18.0 the dialog reports an export that failed, in an error box naming the reason, and stays open so you can correct a setting and retry. Before, it ended in "Export ready, close dialog" whether or not anything had been written.

Note what this means when upgrading: an export that has always appeared to succeed can start reporting an error on the first run after the upgrade. Nothing became more fragile — the failure was there before and was being swallowed. The eventlog shows which item failed and why.