Territories

Working with the Territory Data in a Geographic Information System (GIS)

The TheocBase sqlite database can be opened in a GIS software that allows users to analyze or combine the data with other sources e.g. create high quality maps for the Kingdom Hall. In the following instructions QGIS is used, a multi-platform GIS available for free, but other programs may be used similarly.

Add Territory Layers to a QGIS Project

  1. Open or create a new project in QGIS.
  2. Select the menu item Layer>Add Layer>Add Vector Layer...
  3. Choose File as Vector Source Type.
  4. Click on the Browse button and select the "theocbase.sqlite" file.
  5. Click on the Add button.
  6. Select the layers you want to use in QGIS:
    territory: for editing boundaries
    territories: for viewing and analyzing the territories
    territory_address: for editing addresses
    territoryaddresses: for viewing and analyzing the addresses
    territory_street: for editing streets
    territorystreets: for viewing and analyzing the streets
  7. Caution:
    When editing the geometry in a third party tool like QGIS, TheocBase will not be aware of the changes during 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. Alternatively you can also export the territories into a KML file and reimport this file in TheocBase.
  8. Add the layers by clicking on the OK button.

Export into a KML File

  1. Right click the layer you want to export and select Export>Save Features As...
  2. In the Format field choose Keyhole Markup Language [KML].
  3. Click on the Browse button and select a filename.
  4. Choose the CRS (Coordinate Reference System): EPSG:4326.
  5. Under Select fields to export and their export options check the following fields:
    territory_number
    locality
  6. Edit the Datasource Options:
    Enter "locality" next to DescriptionField.
    Enter "territory_number" next to NameField.
  7. Click OK to save the KML file.