Given a centroid and side length, tile an area with regular flat hexagons
Project description
Hexcover
A 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:
centretoptoprightbottomrightbottombottomlefttopleft
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.
Input Coordinates
A projected coordinate system must be used. Don't give input in e.g. WGS84
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hexcover-0.6.0.tar.gz.
File metadata
- Download URL: hexcover-0.6.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ec4dd9cde5c202b1e0c9c705ab30f2a971e3e3eb5dc8047d3d0f7d432bba5ce
|
|
| MD5 |
ac34b30c7880cba16de45a623d2aa66d
|
|
| BLAKE2b-256 |
d1ca22c01a2bf8404fe481844bd158b02ae8a3e4a7fb565cc272a49ba80035f5
|
File details
Details for the file hexcover-0.6.0-py3-none-any.whl.
File metadata
- Download URL: hexcover-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a9060eacde3904e634ab64ab91146e266bbe24262bcf02d5828f11e648327e0
|
|
| MD5 |
4c3a236b4e34ed2133c6f9c9f7d29f86
|
|
| BLAKE2b-256 |
9c61b2d3a28ae65e8fb909a3ce174063a32465a172958b6447bc39425a9dd79f
|