Library with some less common or extended spatial functions
Project description
PyGeoOps
PyGeoOps provides some less common or extended spatial algorithms and utility functions.
Introduction
This is a shortlist of the available functions:
- centerline: centerline/medial axis calculation for a polygon, including optional cleanup of short branches.
- view_angles: determine the start and end angle a polygon is visible from the viewpoint specified
- simplify: simplify a polygon, with some extended options like
- choice in simplification algorithms: Lang (+ a variant), Ramer Douglas Peuker, Visvalingal Whyatt
- specify points/locations where points should not be removed by the simplification
- topologic simplification: common boundaries between input features should stay common
- utility functions to create and split grids (create_grid, split_tiles)
- general utility functions on geometries like remove_inner_rings, collection_extract,…
Full documentation can be found on Read the Docs.
Usage
The centerline for a polygon, including the default cleanup of short branches, can be calculated like this:
import pygeoops
import shapely
polygon = shapely.from_wkt("POLYGON ((0 0, 0 8, -2 10, 4 10, 2 8, 2 2, 10 2, 10 0, 0 0))")
centerline = pygeoops.centerline(polygon)
Installation
PyGeoOps is available on PyPi, so can be installed using pip:
pip install pygeoops
Another option is to use conda or mamba, as it is also available on conda-forge:
conda install pygeoops --channel conda-forge
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
pygeoops-0.5.0a1.tar.gz
(47.0 kB
view hashes)
Built Distribution
pygeoops-0.5.0a1-py3-none-any.whl
(32.6 kB
view hashes)
Close
Hashes for pygeoops-0.5.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a19c458b5668b0e4638d784a9fee418ebebb74e35ddad995c11da60e246fa1 |
|
MD5 | 291560e86948df3e0d8738b3eaba0978 |
|
BLAKE2b-256 | 89b66685a885e77337b3e62c97fd96f3fb6ce3a976daca8ba80032ccfc566bac |