Skip to main content

Tessellation of Urban Areas

Project description

tesspy

Tests Project Status: Active – The project has reached a stable, usable state and is being actively developed. Documentation Status version Conda Version

tesspy is a python library for geographical tessellation.

The process of discretization of space into subspaces without overlaps and gaps is called tessellation and is of interest to researchers in the field of spatial analysis. Tessellation is essential in understanding geographical space and provides a framework for analyzing geospatial data. Different tessellation methods are implemented in tesspy. They can be divided into two groups. The first group is regular tessellation methods: square grid and hexagon grid. The second group is irregular tessellation methods based on geospatial data. These methods are adaptive squares, Voronoi diagrams, and city blocks. The geospatial data used for tessellation is retrieved from the OpenStreetMap database.

Installation

You can install tesspy from PyPI using pip (Not Recommended):

pip install tesspy

and from conda (Recommended):

conda install -c conda-forge tesspy

Creating a new environment for tesspy

tesspy depends on geopandas, which could make the installation sometimes tricky because of the conflicts with the current packages. Therefore, we recommend creating a new clean environment and installing the dependencies from the conda-forge channel.

Create a new environment:

conda create -n tesspy_env -c conda-forge

Activate this environment:

conda activate tesspy_env

Install tesspy from conda-forge channel:

conda install -c conda-forge tesspy

Install from the repository

If you want to work with the latest development version, you can directly install it from GitHub. To do that, it is recommended to first install all the dependencies using conda. (preferably in a newly created env).

conda install -c conda-forge geopandas scipy h3-py osmnx hdbscan mercantile scikit-learn

Then install TessPy using:

pip install git+git://github.com/siavash-saki/tesspy

Dependencies

tesspy's dependencies are: geopandas, scipy, h3-py, osmnx, hdbscan, mercantile, and scikit-learn.

Documentation

The official documentation is hosted on ReadTheDocs.

Examples

The city of "Frankfurt am Main" in Germany is used to showcase different tessellation methods. This is how a tessellation object is built, and different methods are called. For the tessellation methods based on Points of Interests (adaptive squares, Voronoi polygons, and City Blocks), we use amenity data from the OpenStreetMap.

from tesspy import Tessellation
ffm= Tessellation('Frankfurt am Main')

Squares

ffm_sqruares = ffm.squares(resolution=15)

Squares_tessellation

Hexagons

ffm_hex_8 = ffm.hexagons(resolution=8)

hexagon_tessellation

Adaptive Squares

ffm_asq = ffm.adaptive_squares(start_resolution=14, threshold=100, poi_categories=['amenity'])

adaptive_squares_tessellation

Voronoi Polygons

ffm_voronoi = ffm.voronoi(poi_categories=['amenity'], n_polygons=500)

Voronoi_tessellation

City Blocks

ffm_city_blocks = ffm.city_blocks(n_polygons=500)

city_blocks_tessellation

Contributing to tesspy

All kind of contributions are welcome:

  • Improvement of code with new features, bug fixes, and bug reports
  • Improvement of documentation
  • Additional tests

Follow the instructions here for submitting a PR.

If you have any ideas or questions, feel free to open an issue.

Acknowledgements

tesspy is the result of the research project ClusterMobil conducted by the Research Lab for Urban Transport. This research project is funded by the state of Hesse and HOLM funding under the “Innovations in Logistics and Mobility” measure of the Hessian Ministry of Economics, Energy, Transport and Housing. [HA Project No.: 1017/21-19]

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

tesspy-0.1.2.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

tesspy-0.1.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tesspy-0.1.2.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for tesspy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 06c58fae63125184994ebeaedbea4f4023d5930d466a3218cd8be070f1c93079
MD5 9275264bcc57c150c20ca41dde9a5288
BLAKE2b-256 ecbef2ec8613d71f9b11be3760ade670b0129fe00467a44be1dc3301b8673e9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tesspy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for tesspy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c0a16a3647741dbd77c02c0c64c61f317bb0439c6dcec4d0e8135a2a3de5698
MD5 43e98fc6c33b3b018fc2a1aaa26c6a39
BLAKE2b-256 9760f5e6a0f39511d55c6e0eb0f6584401bceb2e6fc176ebe20626e975d17529

See more details on using hashes here.

Supported by

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