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.3.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.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

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

Hashes for citygisoo-0.1.3.tar.gz
Algorithm Hash digest
SHA256 58b2d8b7be67ce05f2da2f006a44afa31d63476da6b708e63bb86d894de8017c
MD5 59367b4cf8154f9863998dafb8b00bb5
BLAKE2b-256 0fae16e6fa491fedcaf82c5dc84571d2368aa3a4951dd97cfd84d1c44c4bc5d6

See more details on using hashes here.

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

Hashes for citygisoo-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b21c9675f1d4d9e4ea6fe5b9b47bce9434df4d570475010af8475edd749188e
MD5 36ae0012a4a590b73159ad382da6df8f
BLAKE2b-256 f886d3de7ac92780390054c97a0ec095d5749b6c86339e846ea7a683a5ec1681

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