# Codification editor#

The editor will allow to carry out the codification used during your topographic survey. The resulting geometries of your processing will be in [GeoPackage] files that you will have created beforehand. You can pre-fill attributes from this configuration.

The configuration file is a simple text file in YAML format: [QLSC] (.qlsc extension). You can make as many codifications as you want.

## Requirements#

The preparation of the codification cannot be done without having first opened a QGIS project containing the layers in which the data will be inserted. These layers must be in [GeoPackage]. There is no limitation on the number of these [GeoPackages]. A good practice is to group the layers in thematic [GeoPackage]: water, sanitation, roads, etc. If the data is in a PostgreSQL database, it is possible to export them in [GeoPackage] via the “Layer Packaging” tool or the [exportDBMapper] plugin (https://gitlab.com/Oslandia/qgis/exportdbmapper/).

You can find use cases in the data preparation section

By clicking on the icon , the codification configuration window appears.

## Description of the form#

### General settings#

The general settings define the separators used:

• a separator to indicate the different codes on a same point

• another one to indicate the settings.

These must be adapted according to the capacities of the field notebook.

### Codification#

#### Code#

Code can be alphanumeric, there are no restrictions, but it must be compatible with your device.

Warning

It is best not to insert spaces or special characters.

#### Description#

The Description field allows you to add a comment to the code.

#### Geometry#

The Geometry is to be chosen from the one indicated above. It is filtered on the geometry of the « Output layer » from the « [GeoPackage] » selected below.

### Attributes#

You have the possibility to generate automatically the attributes in the columns of the layer using the same principles as the expression calculator of QGIS. However, this calculator is not designed to accept the complex queries. It is preferable to perform this step after importing the data.

If the data exported from the notebook has additional attributes, it is possible to integrate them by specifying in, the expression field _attN where N is the field number (starting with 1).

There is no limitation on the attributes as long as the CSV file is compliant.

### Special points#

Points in error can be added to a particular layer as well as all surveyed points.

Note

We call “in error”, the points which are not in conformity with the rule of codification, for example code having to have 3 points and having only 2 points, etc.

### Opening / Registration#

The FIle menu allows the opening, closing, saving, etc. of the codification.