View and edit territories in QGIS
Add theocbase territory layers to a QGIS project
- Open or create a new project in QGIS.
- Select the menu item Layer>Add Layer>Add Vector Layer...
- Chose File as Source type.
- Click on the Browse button and select the "theocbase.sqlite" file.
- Click on the Open button.
- Select the layers you want to use in QGIS:
- territory: for editing boundaries
When editing the geometry in a third party tool like QGIS, theocbase will not be aware of the changes when cloud syncing. In order to upload the changes you need to mark the territories as edited e.g. add a blank in the remark field. In QGIS you can also export the territories into a KML file
and import this file in theocbase
- territories: for viewing and analizing the territories
- Add the layers by clicking on the OK button.
Split a territory
- Open the QGIS project with the theocbase territory layer.
- Select and copy the territory that you want to split through Edit>Copy Features.
- Paste the territory into a new scratch layer by selecting the menu item Edit>Paste Features As>Temporary Scratch Layer....
- Click OK in the following Dialog New temporary scratch layer name.
- Toggle editing and select the menu item Split Features from the Edit menu.
- Start clicking in the map along the line that should split the territory.
Note: Start and end outside the territory.
- After finishing with a right click, the territory is split apart.
- Open the Attribute Table and change the territory number and locality of one part.
- Save the changes by Toggle Editing.
- Export the scratch layer into a KML file.
- Import the KML file in theocbase.
Export into a KML file
- Right click the layer you want to export and select Save As...
- In the Format field choose Keyhole Markup Language [KML].
- Click on the Browse button and select a filename.
- Chose the CRS (Coordinate Reference System): EPSG:4326.
- In the field Select fields to export and their export options chose the following fields:
- Edit the Datasource Options:
- Enter locality in DescriptionField.
- Enter territory_number in NameField.
- Click OK to save the KML file.