Given a centroid and side length, tile an area with regular flat hexagons
Project description
Hexcover
A small utility package which calculates a regular hexagonal tiling for an area, given a centroid as a Shapely Point, and a side length.
Installation
Hexcover
is available on PyPI:
pip install hexcover
Usage
from shapely.geometry import Point
from hexcover.util import hexagon_coverage
# centroid
c = Point(0.0, 0.0)
coverage = hexagon_coverage(c, 10)
# coverage is a namedtuple of seven polygons. The first entry is the central polygon.
# Subsequent entries begin directly above the central polygon, and proceed clockwise.
The returned namedtuple
has seven fields:
centre
top
topright
bottomright
bottom
bottomleft
topleft
Examples
There's an example notebook, and a sample output GeoJSON file showing the result of covering the Crystal Palace Transmitting Station with 100-metre hexagons.
Requirements
Shapely
>= 1.6.3
License
The Blue Oak Model License 1.0
DOI
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.
See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for hexcover-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4edcc22f21c609f065df4bf971fab760cfdc16f9f04bb2482b1301a29eb9c7 |
|
MD5 | 1da07de6ad137a32bc5b896e7af745e2 |
|
BLAKE2b-256 | 888f19d13f742d8154855646cfbf837afeac9192d0ae234bae6f99d8c7d94119 |