/HexGridGeoSwift

Primary LanguageSwiftBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

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)