Skip to main content

PyQGIS utilities and cleaning workflows for CityGISOO

Project description

citygisoo logo

citygisoo

Project Developer: Alireza Adli

Table of Contents

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:

  1. Install QGIS.

  2. 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 example pythonqgis.exe.

  3. Update environment variables.

    a. Open Environment Variables from Windows Start. b. Edit Path and add:

    C:\Program Files\QGIS 3.34.1\apps\Python39

    c. Create/Edit PYTHONPATH and add (separated by semicolons):

    i. C:\Program Files\QGIS 3.34.1\apps\qgis\python ii. C:\Program Files\QGIS 3.34.1\apps\qgis\python\plugins iii. C:\Program Files\QGIS 3.34.1\apps\Qt5\plugins iv. C:\Program Files\QGIS 3.34.1\apps\gdal\share\gdal v. 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

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citygisoo-0.1.2.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

citygisoo-0.1.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file citygisoo-0.1.2.tar.gz.

File metadata

  • Download URL: citygisoo-0.1.2.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

Hashes for citygisoo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 18fd0602717f796fbc11ecfd8fe12e40225c5436434858fde2b5dff3be996f37
MD5 e93ba80722f0951abcb670ea19ac3620
BLAKE2b-256 8e37b4c828c294425f261afa6833333f1a8d4a6d34ff6037e742d4b10e8c5b0a

See more details on using hashes here.

File details

Details for the file citygisoo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: citygisoo-0.1.2-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

Hashes for citygisoo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fab252318299acd60bd72ee11f1923415409d76a6fbff26cb014c17154648e36
MD5 b204c34bd2f78e17373d71037bcce98b
BLAKE2b-256 05abd3e8d73388de44da49499725d2573be7d72d157a03a140c6773ae015fb23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page