PyQGIS utilities and cleaning workflows for CityGISOO
Project description
citygisoo
Project Developer: Alireza Adli
Table of Contents
- What Is citygisoo
- Approach and Scope
- citygisoo in Sabu
- Testing and Publication Context
- ScrubLayer
- Setting up an environment to use standalone PyQGIS - How to import qgis.core
- Name and Dedication
What Is citygisoo
citygisoo is a Python package that leverages PyQGIS functions for cleaning building-related geospatial data, with the goal of supporting automated data-cleaning pipelines.
The name citygisoo stands for Object-Oriented Geographic Information System for Cities.
The package follows an object-oriented design. Its central component is the ScrubLayer class, which consolidates key cleaning and transformation operations commonly used in city-scale workflows.
Approach and Scope
citygisoo builds on existing PyQGIS functionality and, where necessary, extends or combines these capabilities to support additional operations required for automated geospatial data cleaning.
The design principles and methodology behind this approach will be discussed in more detail in upcoming papers and reports.
citygisoo in Sabu
citygisoo is a shared library within the Sabu project.
Sabu is a sector-based carbon-emission evaluation framework built on a microservices architecture.
Each module runs as an independent service (a “jug”). Current services focus on building life-cycle assessment and city-scale geospatial cleaning and validation workflows. In addition to these services, Sabu includes shared Python libraries such as sabu-chassis, which provide reusable internal functionality.
Testing and Publication Context
citygisoo was initially tested using geospatial data from Montréal Island.
It is now being published so that it can be applied to other cities simply by installing the package via pip.
ScrubLayer
ScrubLayer is the core class of the package. It wraps and orchestrates essential PyQGIS operations used in geospatial cleaning workflows and provides higher-level methods for automating multi-step tasks.
Setting up an environment to use standalone PyQGIS - How to import qgis.core
To use PyQGIS without having the QGIS application run in the background, one needs to add the python path to the environment variables. Here is how to do it on Windows:
-
Install QGIS.
-
Assign a specific name to the QGIS Python executable. This is done to access QGIS Python from command prompt without mixing with the system Python installation(s).
a. Go to the QGIS installation directory's Python folder (for example:
C:\Program Files\QGIS 3.34.1\apps\Python39). b. Rename the Python executable (python.exe) to a specific desired name, for examplepythonqgis.exe. -
Update environment variables.
a. Open Environment Variables from Windows Start. b. Edit
Pathand add:C:\Program Files\QGIS 3.34.1\apps\Python39c. Create/Edit
PYTHONPATHand add (separated by semicolons):i.
C:\Program Files\QGIS 3.34.1\apps\qgis\pythonii.C:\Program Files\QGIS 3.34.1\apps\qgis\python\pluginsiii.C:\Program Files\QGIS 3.34.1\apps\Qt5\pluginsiv.C:\Program Files\QGIS 3.34.1\apps\gdal\share\gdalv. Or all together:C:\Program Files\QGIS 3.34.1\apps\qgis\python;C:\Program Files\QGIS 3.34.1\apps\qgis\python\plugins;C:\Program Files\QGIS 3.34.1\apps\Qt5\plugins;C:\Program Files\QGIS 3.34.1\apps\gdal\share\gdal -
Validate importing
qgis.core.a. Open a command prompt window. b. Run
pythonqgis. c. If setup is correct, there should be no import error. d. In Python, run:import qgis.core
citygisoo must be installed with pip in the interpreter configured above.
Name and Dedication
In Persian, gisoo refers to long hair, especially long or braided hair, and the word is most commonly used when speaking about a woman’s hair.
I began developing this project in the aftermath of the Woman, Life, Freedom movement in Iran. The movement emerged following the killing of Mahsa Jina Amini, who died in the custody of the Islamic Republic’s morality police after being arrested for allegedly violating the state’s compulsory hijab rules.
Since the Woman, Life, Freedom movement, the enforcement of hijab restrictions in Iran has changed significantly. Although no formal legal reform has been enacted, the rules are no longer enforced in the same way as before.
While working with geospatial data of Montréal, the shape of the island on the map reminded me of a ponytail—like a gisoo. This association inspired the name of the project. I chose gisoo as a small tribute to the courage of the women in Iran who have fought for freedom and human rights.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file citygisoo-0.1.3.tar.gz.
File metadata
- Download URL: citygisoo-0.1.3.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b2d8b7be67ce05f2da2f006a44afa31d63476da6b708e63bb86d894de8017c
|
|
| MD5 |
59367b4cf8154f9863998dafb8b00bb5
|
|
| BLAKE2b-256 |
0fae16e6fa491fedcaf82c5dc84571d2368aa3a4951dd97cfd84d1c44c4bc5d6
|
File details
Details for the file citygisoo-0.1.3-py3-none-any.whl.
File metadata
- Download URL: citygisoo-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b21c9675f1d4d9e4ea6fe5b9b47bce9434df4d570475010af8475edd749188e
|
|
| MD5 |
36ae0012a4a590b73159ad382da6df8f
|
|
| BLAKE2b-256 |
f886d3de7ac92780390054c97a0ec095d5749b6c86339e846ea7a683a5ec1681
|