Skip to main content

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:

  • 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.

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

DOI

Release files for hexcover 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexcover 0.6.0
File Size Uploaded
hexcover-0.6.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hexcover 0.6.0
File Interpreter ABI Platform
hexcover-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size:16.4 kB

Release files / hexcover-0.6.0.tar.gz

Download URL hexcover-0.6.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4ec4dd9cde5c202b1e0c9c705ab30f2a971e3e3eb5dc8047d3d0f7d432bba5ce
BLAKE2b-256 checksum
How to use checksums
d1ca22c01a2bf8404fe481844bd158b02ae8a3e4a7fb565cc272a49ba80035f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / hexcover-0.6.0-py3-none-any.whl

Download URL hexcover-0.6.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a9060eacde3904e634ab64ab91146e266bbe24262bcf02d5828f11e648327e0
BLAKE2b-256 checksum
How to use checksums
9c61b2d3a28ae65e8fb909a3ce174063a32465a172958b6447bc39425a9dd79f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

1 release file

0.4.2

2 release files

0.4.1

2 release files

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page