Generate Geopackage mapping file...

<< Click to Display Table of Contents >>

dpCom > Menu reference > File > Import > Geopackage >

Generate Geopackage mapping file...

Importing a Geopackage file and setting up its mapping file is a complex process consisting of several steps. The user performing the import needs to have a good knowledge of the file format and is expected to understand how object types, subtypes and component types are applied in the application.

There are no requirements of a specific administrative role to import a Geopackage file. It is possible to view details about changed objects in the application before posting changes to the database. Select File > Show changes  > changed objects, or File > Post > Show > changed objects.

Settings that are made in the window for generating mapping files are applicable during the entire session provided that no changes are made during the session.

Create a mapping file for Geopackage import

1.Select File > Import > Geopackage > Generate Geopackage mapping file....

2.Select the Geopackage file for which the mapping file will be applied on.

3.Select settings for the mapping file, this is optional:

a.Table settings.

b.Symbol Preferences.

c.Text Preferences.

4. Select Open.

5. Select where to save the draft for the mapping file.

6. Select character set for mapping file.

7. Select Save.

8. Select OK.

9. Open the mapping file in a text editor and complete it by mapping the objects in the file against suitable objects in the application.

 

Settings

Look In

Catalog where the file is located.

File Name

Name of the selected file.

Files of Type

Filters files of the selected file format from the current directory.

Table settings

Select table

Specifies which table to handle.

Grouping field

Specifies which data to handle, that is from which column in the table the data is processed. The grouping fields can differ between different tables.

Load table

 

Symbol Preferences

Rotation

Sets the angle at which the symbol is to be placed on the map.

Text Preferences

Text

Specifies the column in the table from which the text is retrieved.

Justification

Sets the insertion point of the text. That is, how the text will grow when edited.

Rotation

Sets the angle at which the text is to be placed on the map. Most common is horizontal.

Height

Sets the height of the text.

Open

Opens a new window for selection of the file name of the mapping file and where to save it.

Cancel

Cancels the session and closes the window.

 

Rotation settings

To control how rotation of symbols or text is interpreted when importing data, use the angle_unit parameter in the mapping file. Four types of rotation units are supported:

DEGREE - Rotation is specified in full degrees (0-360).

RADIAN - Rotation is specified in radians (0-2π).

GRADIAN - Rotation is specified in gradians (0-400).

FACTOR_OF_DEGREE - Rotation is specified as a factor of degrees (for example, one tenth of a degree = 0.1).

 

When using FACTOR_OF_DEGREE the following settings are also required:

angle_unit.offset=0.0

angle_unit.conversion_factor=0.1

offset - Adjusts the zero direction, for example if 0° represents east or north.

conversion_factor - Converts the input value to degrees. For example, set it to 0.1 if the value is in tenths of a degree.

Use a negative conversion_factor if the direction of rotation in the data is counterclockwise instead of clockwise.

 

More information

When importing Geopackage files, it is possible to map attributes to a constant. Also add support for some specific constants: $FILENAME$, $FILEPATH$, $FILE_PARENT_DIR$ and $FILE_ROOT_DIR$, to be used to store information from where the object is imported from.

 

$FILENAME$ - name of the import file

$FILEPATH - path + name of the import file

$FILE_PARENT_DIR$ - the parent directory of the import file

$FILE_ROOT_DIR$ - the root directory of the import file

 

The generated mapping file will include the text <NULL_OR_EMPTY> as a grouping field value if your data source file has null or empty values in this column. The Geopackage mapping file generator offers three configuration options for controlling null/empty string matching:

mapping_for_null

mapping_for_empty_string

mapping_for_null_or_empty

 

It is currently set to the third one, mapping_for_null_or_empty, meaning

that a section that matches null or empty string will be generated.

If you want two separate sections, then

 

mapping_for_null=true

mapping_for_empty_string=true

 

should be set.