How to create AI train data with QGIS

From Tygron Preview Support Wiki
Revision as of 09:21, 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 or WMS Layer of your project. In this case we will use the original satellite background layer of a Project's WMS service.

How to create AI train data with QGIS:
  1. Open your project in editor mode.
  2. Hover over Areas in the ribbon bar, and select Add new Empty Area.
  3. With the Area selected, select the Attribute tab in the Area Detail Panel.
  4. Under Add new Attribute, type FOLIAGE for name and 1 for value.
  5. Click Save New Attribute to add the FOLIAGE attribute.
  6. Click on the Group by Attribute button in the Area Overview Panel.
  7. Add the same Attribute name as added for the Area in the previous steps.
  8. Next, hover over Areas in the ribbon bar and select Export Geo Data
  9. For Filter, select Foliage
  10. Select any of the GeoJSON options.
  11. Click on the Copy the URL button next to Web Feature Service (WFS)
  12. Open QGIS
  13. In QGIS, Hover over Layer in the ribbon bar, and under add new Layer, select add WFS / OGC API Feature Layer
  14. In the Data Source Manager panel, select New.
  15. Paste the copied WFS url from the Export Geo Data panel and paste it in the url field.
  16. Provide an appropriate name, for example Foliage - My Project Name and confirm.
  17. Click on the Connect button.
  18. Select the layer named Foliage Areas and click on Add.
  19. In the Tygron Application again, hover over Overlays and select Export Grid Data
  20. Click on the Copy URL

Notes

  • You can choose to change the Attribute Form of the WFS Feature Layer to use the Classification instead of a text field with a number, in case the classification numbers are hard to remember.