Skip to content

This script was designed for RWSS department of WASAC in Rwanda. It can create QField datasets each district from PostGIS database.

License

Notifications You must be signed in to change notification settings

WASAC/postgis2qfield

Repository files navigation

PostGIS2QField

GitHub Docker Cloud Automated build Docker Image Size (latest by date)

postgis2qfield.py

A simple tool for exporting from a PostGIS table to Zipped QField datasets. Assumes Python 3.6+, psycopg2, light-progress, geopandas, GDAL, Fiona, Shapely, are already installed and in your PATH.

You can install using pip by requirements.txt as follow.

pip install -r requirements.txt

The tool was designed for RWSS department of WASAC in Rwanda.

Example usage:

To export table administrative boundary and water pipeline networkfrom database rwss_assets as user user to zipped QField datasets:

Before running the script, kindly check the database settings at command line parameters.

python postgis2qfield.py -d yourdatabase -H localhost -p 5432 -u user -w securePassword

If you want to filter only specific dictricts, use -l parameter to list ID of district by comma(,)

python postgis2qfield.py -l 51,52,53

Run on Docker

cp .env.example .env
vi .env # modify database connection settings.
docker-compose up

The data will be generated under data folder.


This script was developed by Jin IGARASHI, JICA Expert from The Project for Strengthening Operation and Maintenance of Rural Water Supply Systems in Rwanda- RWASOM.

About

This script was designed for RWSS department of WASAC in Rwanda. It can create QField datasets each district from PostGIS database.

Resources

License

Stars

Watchers

Forks

Packages

No packages published