Module 2: Working with different data sources

From ObjectVision

Jump to: navigation, search


Different data types

In GeoDMS you can read many different data types:

  • Tables: .csv, .asc, .dbf, .xml, .xdb, .txt
  • Grid raster: .tif, .asc
  • Vector: .shp
  • GeoDMS' own data storage file: .fss
  • Databases: MsAccess, PostgreSQL/PostGIS, FileGeoDatabase

In the following configuration file you'll see example of how you can configure several common data types: download configuration. How to set up this configuration see: Module 0: Install GeoDMS GUI and setup a configuration

Read a raster file

Now you should navigate to SourceData and here you'll see serveral types of SourceData listed. Click on the top one called: "Raster_TifData", and press CTRL + E or right-click and choose "Edit Config Source". That will open a text editor, preferably Notepad++

unit<ipoint> Raster_TifData 
: StorageName = "%ProjDir%/Data/bbg2015_100m_10k.tif"
, StorageType     = "gdal.grid"
, StorageReadOnly = "true"
, DialogData = "rdc_base"
	attribute<uint8> grid (NL_grid/domain);

When reading source data, you load a data set of a certain domain. To define that domain in GeoDMS, configure a unit with several properties.

  • StorageName: this tells GeoDMS where to find the datafile
  • StorageType: what storage reader should be used. For external rasterfiles use "gdal.grid", for ESRI-shapefiles use "gdal.vect".
  • StorageReadOnly: specify whether GeoDMS is allowed to edit files.
  • DialogData: what attribute should be used to visualise the dataset.

Furthermore, an attribute called grid is configured, it has no expression but has a domain equal to the grid domain of the configuration.

By convention you should configure your configuration in a way that all data that is just being read should be in SourceData, and then when you do any analysis that should be done in the Analysis container. This way there is a natural division between the original data and the manipulated data/results.

Read a point shapefile

A point shapefile is read in a similar way. However, the StorageType is now gdal.vect and the DialogData is geometry. And there could be an attribute called geometry without an expression, but with a value type that tells GeoDMS in which coordinate system it should read the data in the shapefile.

unit<uint32> Shapefile_PointData_PC4
:	StorageName     = "%ProjDir%/Data/pc4_xy_tm2020.shp"
,	StorageType     = "gdal.vect"
,	StorageReadOnly = "True"
,	DialogType = "Map"
,	DialogData = "geometry"
	attribute<rdc>       geometry;

Read a line shapefile

The line data is again very similar, there is one difference. And that is that after the attribute name of geometry it now says "(arc)", this is to let GeoDMS know that we are configuring line (or arc) data. Additionally, in this shapefile there are more information fields, in this case "roadtype", by explicitly configuring this it is always visible. It is not necessary to configure this.

unit<uint32> Shapefile_LineData
:	StorageName     = "%ProjDir%/Data/OSM_Motorways_NL.shp"
,	StorageType     = "gdal.vect"
,	StorageReadOnly = "True"
,	DialogType = "Map"
,	DialogData = "geometry"
	attribute<rdc>       geometry (arc);
	attribute<uint8>     roadtype;

Read a polygon shapefile

For polygons, the only thing that changes is that it says poly (or polygon) instead of arc after geometry

attribute<rdc>       geometry (arc);

Read fss point data

Again similar, but now the property StorageType is not needed.

unit<uint32> FSS_PointData
:	StorageName = "%ProjDir%/Data/IC_Stations_2019.fss"
,	StorageReadOnly = "True"
,	DialogType = "Map"
,	DialogData = "geometry"
	attribute<rdc>     geometry;
	attribute<string>  label;

The GeoDMS cannot check whether certain data types have been changed between sessions, i.e. shapefiles. Therefore, it recalculates everything that uses such data types. A way to circumvent this and thefefore speed up repeated calculation is to save such data type to GeoDMS' own data storage file (.fss). You have to do that once and then direct expressions towards that disconnected data attribute.

Go to previous module: Module 1: Learning the basic concepts of GeoDMS

Go to next module: Module 3: Doing basic analyses with vector data

Personal tools