Customizing options of view of a spatial database

Print Previous page Top page Next page

DBM file (* .dbm) is used to store the parameters of access to the database and settings for the formation of a cartographic view (view) from spatial data from its tables. This file has an XML structure and contains all the necessary settings for the formation of a cartographic view of a spatial database. The structure of the DBM file is given in Appendix 4.

Setting the parameters of the DBM file is performed using a special dialog.

Options of view of spatial database are divided into several sections.

View options

This section contains the passport data of the map, in the form of which the operator will be provided with the spatial database view (all options are required):

  1. Map Identifier - unique alphanumeric combination in format GUID (Globally Unique Identifier). This identifier should not be repeated for different DBM maps. It uniquely defines the view of a spatial database and is also is used to form the base name of the cache-map for this spatial database. The map identifier is formed  automatically when creating a new DBM-file. If the map identifier is the same for different DBM files (for example, as a result of manually editing a DBM file or copying DBM files), conflicts may result, leading to the loss or damage of data in the spatial  database.
  2. Map name - short meaningful name of the cartographic view.
  3. Filename of the map classifier is the path to the RSC digital classifier file, on the basis of which the cartographic view of the spatial database will be formed.
  4. Coordinate System/EPSG Code - a code in the database of the Internaltional Association of Oil and Gas Producers (formerly European Petroleum Survey Group - EPSG), which defines the parameters of the coordinate system and projection that are used to form the cartographic view. To minimize recalculations when working with cartographic view, it is recommended to specify the EPSG code of the coordinate system in which the coordinates are stored in the source database table, or EPSG: 4326 (WGS84 - World Geodetic System 1984).
  5. Scale - the base scale of the cartographic view. Affects the visualization of conventional symbols specified in the digital classifier RSC.

 

Customizing a database connection

In this section the unique name of set of the options is specified which are responsible for connection to the required DB:

  1. DBMS - specifies type of a control system of databases under management of which the required spatial database works. This parametre defines type of the used driver for work with the database.
  2. Name of connection - unique name of set of the options responsible for connection to the required database. It is used at filling of options of a DBM-file as the reference to a set of options of connection to a DB (all parametres, except for path of location of the data cache, are mandatory for filling).
  3. Host name - a network name or the IP-address of the database server.
  4. Port number - the number of TCP-port on the database server through which the connection to the database is allowed.
  5. Login - the name of the database user on whose behalf the connection to the spatial database should be performed.
  6. Password - the password of the database user, on whose behalf it is necessary to connect to the spatial database.
  7. Base name - the name of the database on the database server, which is used as a database identifier for connecting to it.

 

Data selection

The section «Select data» contains options that determine the way to access a dataset with spatial information in the database. Access to information in the database is possible in one of two ways: direct access to the table in the database, execution of an arbitrary SQL query. Write back in the database is possible only with the first way. When using an SQL query, access to the database is performed only for reading. Required for filling is the table name or the query text - depending on the selected method.

  1. Type of data selection - selection of one of two ways of accessing a dataset with spatial information in the database: direct access to a table in the database or execution of an arbitrary SQL query.
  2. Table name - sets the table name in the database containing information on spatial objects. The table must at least have a unique identifier field and a metric field.
  3. SQL query - the text of SQL-query to get a data selection. The resulting dataset must at least have a unique identifier field and a metric field.
  4. Change log - the table name in the database, in which the operations are logged. This log is used for tracking changes in open datasets and updating the cartographic view. The description of the log structure and the logic of working with it is given in section «Tracking of changes in a spatial database using the change log». The use of the log makes sense only for direct access to the spatial data table in the database; it is not used when executing an arbitrary SQL-query.
  5. Change log polling period - time interval in seconds, which determines the frequency of polling the log table. This option makes sense, if the change log is used. The option is optional. If it is not set, but the log is used, the option is assumed to be equal 5 seconds.
  6. Time of map actuality - time period in seconds during which the information received from a DB is considered up-to-date. This option makes sense, if the change log is not applied. In this case, the cartographic view is updated by completely updating the content from the source database set. Time of map actuality determines the frequency of such a complete update. The option is optional. If it is not specified, but is required because the change log is not used, the parameter is assumed to be 1800 seconds (30 minutes).

 

Description of query result

The section «Description of query result» contains the parameters that determine the processing of information in the dataset of the spatial database - the purpose of the dataset fields, their correspondence to the semantics of objects in the cartographic representation, the way of specifying the external view of objects. Mandatory fields for filling are the field names of the unique identifier and metric. Also you must specify and customize one of options of establishing the conventional view of object in cartographical representation (by code or by object key).

  1. Field of the unique identifier - a field name in a data set of a spatial database onto which the DBM-file is customized, that is responsible for unique identification of records in this set. For tables it must be a primary key. If the table is used for both reading and writing, then this primary key must be an integer 4-byte key. This parameter is required.
  2. Metric field - a field name in a data set of a spatial database in which the spatial information is stored in GEOMETRY format. This parameter is required.
  3. Title field - a field name in a data set of a spatial database onto which the DBM-file intended for storage of the title text is customized. It is used for objects of the «title» type, which is determined by the availability of this localization for the code or key assigned to the object in the RSC digital classifier. In a database, such objects can have either a linear or a point metric. If the field is specified, but has no value for any record of a data set, then the spatial object will be written down in cartographical view as linear or dot (according to metrics type), but not as the title. This parameter is optional.
  4. Way for specifying a conventional symbol - choosing one of two ways of assigning to objects in the cartographic representation of a dataset of a spatial database of the external view, defined in the digital classifier RSC: by key or by code and type. For more details about both ways, see section «Controlling a conventional symbol of object on a map».
  5. Field name of object code - a name of an integer field in a data set of a spatial database on which the DBM-file is customized that is intended for storage of the value corresponding to the code's value of a conventional  symbol in digital classifier RSC. When assigning the external view by the code of conventional symbol in RSC the type defined by the metrics of object in a data set is taken into account.
  6. Sign of alphanumeric code - a flag indicating the use of the value of the «Object code» field as an alphanumeric classification code of object in the map classifier.
  7. Value of object code by default - are the values of codes of conventional symbols from RSC, assigned to objects in the absence of a field of a conventional symbol's code in a data set, or in the absence of value in this field. The default codes of objects are set separately for each type of the object - polygon, line, point, title. Type is defined on the basis of the description of the object metric in a data set, and also taking into account the title field.
  8. Field name of an object key - a field name in a data set of a spatial DB on which the DBM-file is customized, that is intended for storage of the value corresponding to the key value of a conventional symbol in digital classifier RSC. The key already defines in itself the object type, therefore, if the type specified by the key contradicts the type defined in the metric of the object in the dataset, the object can be assigned a system view (purple color) instead of the one specified in the field.
  9. Default object key value ​​- the key value of a conventional symbol from the RSC assigned to the object if there is no key field of a conventional symbol in the dataset, or if there is no value in this field.