How to create AI train data with QGIS

From Tygron Preview Support Wiki
Revision as of 08:50, 15 October 2025 by Frank@tygron.nl (talk | contribs)
Jump to navigation Jump to search

In this how-to, we will use Areas to store our data in. Areas can overlap and be grouped together using a particular attribute, in this case FOLIAGE. The FOLIAGE attribute should contain a single integer number, which represents the classification. For example, we can use the following classification:

  1. Deciduous Tree
  2. Pine Tree
  3. Heath area
  4. Hedge
  5. Bush
  6. Reed
  7. Flower bed
  8. Leafless Tree Area

The areas are drawn on top of a particular Overlay. In this case we will use a Satellite Overlay with a grid size of 0.25 meter.

How to create AI train data with QGIS:
  1. Open your project in editor mode.
  2. Hover over Overlays, and under Topography for Add New, select Satellite.
  3. With the Satellite Overlay selected, change the grid size to 0.25 m.
  4. Hover over Areas in the ribbon bar, and select Add new Empty Area.
  5. With the Area selected, select the Attribute tab in the Area Detail Panel.
  6. Under Add new Attribute, type FOLIAGE for name and 1 for value.
  7. Click Save New Attribute to add the FOLIAGE attribute.
  8. Click on the Group by Attribute button in the Area Overview Panel.
  9. Add the same Attribute name as added for the Area in the previous steps.
  10. Next, hover over Areas in the ribbon bar and select Export Geo Data
  11. For Filter, select Foliage
  12. Select any of the GeoJSON options.
  13. Click on the Copy the URL button next to Web Feature Service (WFS)
  14. Open QGIS