HexGrid Geo
Project description
Basics
GEO wrapper for HexGrid
Example
import hexgrid
import hexgridgeo
import morton
grid = hexgridgeo.Grid(
hexgrid.OrientationFlat, hexgrid.Point(500, 500),
hexgridgeo.ProjectionSM)
hex = grid.hex_at(hexgridgeo.Point(-73.5, 40.3))
code = grid.hex_to_code(hex)
restored_hex = grid.hex_from_code(code)
neighbors = grid.hex_neighbors(hex, 2)
points = [
hexgridgeo.Point(-73.0, 40.0), hexgridgeo.Point(-74.0, 40.0),
hexgridgeo.Point(-74.0, 41.0), hexgridgeo.Point(-73.0, 41.0)
]
region = grid.make_region(points)
hexes_in_region = region.hexes
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
hexgridgeo-py-1.3.tar.gz
(4.2 kB
view details)
File details
Details for the file hexgridgeo-py-1.3.tar.gz
.
File metadata
- Download URL: hexgridgeo-py-1.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f29893f8650bb784656effde6b78fdd00f9483c146834036078bcfd1a034d14b |
|
MD5 | e58cc7f53c544e7b09934e330cfb621e |
|
BLAKE2b-256 | c9ecf73de431a573184491cd48222f231df545d0fc052222dd77e23e5bdfa756 |