Skip to content

Latest commit

 

History

History
14 lines (13 loc) · 481 Bytes

README.org

File metadata and controls

14 lines (13 loc) · 481 Bytes

HexGrid GEO

Basics

GEO wrapper for HexGrid.

Examples

import HexGrid
import HexGridGeo

let grid = HexGridGeo.Grid(orientation: OrientationFlat, size: 500.0, projection: ProjectionSM())
let hex: Hex = grid.hexAt(HexGridGeo.Point(lon: -73.5, lat: 40.3))
let code: Int64 = try! grid.hexToCode(hex)
let restoredHex: Hex = grid.hexFromCode(code)
let neighbors: [Hex] = grid.hexNeighbors(hex, layers: 2)