Skip to main content
< All
...
Export

Treesta Importer Plugin

Treesta Importer – Instructions

Download: via GitHub or directly in QGIS via Extensions → Manage and Install Extensions.

With the Treesta Importer plugin, you can convert data from Tree Cadastre 3 and 4 into the new Treesta format—right in QGIS.

The following are supported:

  • permanent trees
  • Temporary individual trees
  • Areas
  • Plans

Each of the different layers is exported and converted individually and then inserted into the corresponding Treesta layer.

1. ✅ What You’ll Need

You’ll need one or more CSV files containing your existing data. Export each existing layer separately.

The required mapping files are already included in the plugin:

  • fields_mapping*.csv
  • value_mapping*.csv

You don’t need to change anything. The files can be expanded only if necessary, for your own or different mappings.

2. 📤 Export data from the existing tree registry

Repeat the export process for each layer you want to import into Treesta:

  • Trees
  • Temporary individual trees
  • Areas
  • Plans

Export in QGIS

  1. Select the desired layer.
  2. Right-click on the layer.
  3. Select Export → Save Objects As …
  4. Select "Comma-Separated Values [CSV]" as the format.

Use the following settings:

SettingValue
FormatComma-separated values [CSV]
EncodingUTF-8
DelimiterSemicolon
GeometryAS_WKT
KBSPreferably EPSG:4326 – WGS 84
File Namee.g., alte_baeume.csv

The geometry must be output as Well-Known Text (WKT). This applies to both points and polygons.

3. 🚀 Convert data using the plugin

  1. Install the plugin via Extensions → Manage and Install Extensions.
  2. Open any project in QGIS.
  3. Launch the Treesta Importer.
  4. Click "Browse…" and select the CSV file you exported earlier.
  5. Select the appropriate data type from the drop-down menu:
    • Permanent Trees
    • Temporary Trees
    • Area
    • Plan
  6. Click "Start Conversion."

Repeat the conversion for each exported layer.

Import Files Generated

Depending on the selected data type, the plugin creates a uniquely named CSV file in the folder containing the source file:

Selection in the pluginFile CreatedTarget Layer in Treesta
Permanent Treestrees-treesta-import.csvTrees
Temporary Treesindividual-trees-treesta-import.csvTrees
Areaflächen-treesta-import.csvAreas
Planplans-treesta-import.csvAreas

In addition, the plugin can generate the following file:

  • unmapped_values.txt

This file contains values that could not be automatically assigned. Check this file after each conversion before converting the next layer.

The importer also automatically sets the required parameters:

  • Permanent trees: temp = 0
  • Temporary trees: temp = 1
  • Areas: documentation = 1 and atlas = 0
  • Plans: atlas = 1

4. 📥 Import data into Treesta

Load the Treesta database

  1. Before importing, create a backup of the Treesta database, especially if it already contains data.
  2. Open QGIS.
  3. Load only the Treesta database database.gpkg, not the entire Treesta project.
  4. To do this, database.gpkg in QGIS and select the target layers you need.

Important: Do not upload CSV files using drag-and-drop

Do not simply drag the generated CSV file into QGIS. Doing so may cause all columns to be recognized as text, which can lead to errors when importing into the Treesta database.

Loading a CSV File Correctly

  1. Open Layer → Data Source Management.
  2. Select "Separate Texts" on the left.
  3. Select the appropriate import file, for example flächen-treesta-import.csv.
  4. Set the following:
SettingValue
DelimiterSemicolon
Quotation marks"
GeometryWell-Known Text (WKT)
Geometry Fieldthe field with the WKT geometry
KBSEPSG:4326 – WGS 84 or the coordinate system used during export

QGIS usually recognizes the remaining columns automatically.

Copying Objects to the Treesta Layer

  1. Open the attribute table for the loaded CSV file.
  2. Select the desired items:
    • Select all with Strg+A
    • copy using Strg+C
  3. Enable edit mode for the corresponding Treesta target layer.
  4. Insert the data using Strg+V ."
  5. Save the layer changes.

Make sure the data is inserted into the correct layer:

  • bäume-treesta-import.csv → tree_data
  • einzelbäume-treesta-import.csv → tree_data
  • flächen-treesta-import.csv → polygons
  • pläne-treesta-import.csv → polygons

5. 🔍 Check the import

Check the data after each import:

  • Are the number and positions of the objects correct?
  • Were the point and polygon geometries imported correctly?
  • Are the tree species, measures, and levels of urgency appropriate?
  • Are the areas and plans correctly symbolized?
  • Were the date fields carried over?
  • Are photo details and file paths available?
  • Are there any unassigned values in unmapped_values.txt?
  • Are special characters, umlauts, and values with commas correct?

Photo fields and the filenames or paths stored in them are imported. However, the actual image files must also be transferred to the designated photo folder.

Video Tutorial

🛠 Note on Plugin Status

The conversion from Tree Cadastre 4 has been expanded to include permanent and temporary trees, areas, and plans.

Importing data from Baumkataster 3 is generally possible. The new functions for the various layers are still being tested separately for this purpose. Therefore, always check converted data carefully before continuing to work with the Treesta database.