All Projects → uber → H3 Go

uber / H3 Go

Licence: apache-2.0
Go bindings for H3, a hierarchical hexagonal geospatial indexing system

Programming Languages

c
50402 projects - #5 most used programming language
go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to H3 Go

H3
Hexagonal hierarchical geospatial indexing system
Stars: ✭ 3,167 (+2583.9%)
Mutual labels:  uber, geospatial
H3 Py Notebooks
Jupyter notebooks for h3-py, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 82 (-30.51%)
Mutual labels:  uber, geospatial
H3 Py
Python bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 354 (+200%)
Mutual labels:  uber, geospatial
H3 Java
Java bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 150 (+27.12%)
Mutual labels:  uber, geospatial
H3 Js
h3-js provides a JavaScript version of H3, a hexagon-based geospatial indexing system.
Stars: ✭ 418 (+254.24%)
Mutual labels:  uber, geospatial
Ofbiz Plugins
Apache OFBiz is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Business/E-Commerce, Supply Chain Management and Manufacturing Resource Planning. OFBiz provides a foundation and starting point for reliable, secure and scalable enterprise solutions.
Stars: ✭ 83 (-29.66%)
Mutual labels:  geospatial
Geojson2h3
Conversion utilities between H3 indexes and GeoJSON
Stars: ✭ 93 (-21.19%)
Mutual labels:  geospatial
Examples
Self-contained examples for the legacy Maps API for JavaScript.
Stars: ✭ 78 (-33.9%)
Mutual labels:  geospatial
R Raster Vector Geospatial
Introduction to Geospatial Raster and Vector Data with R
Stars: ✭ 76 (-35.59%)
Mutual labels:  geospatial
Geoblacklight
Discovery platform for GIS data.
Stars: ✭ 116 (-1.69%)
Mutual labels:  geospatial
Proj4js
JavaScript library to transform coordinates from one coordinate system to another, including datum transformations
Stars: ✭ 1,365 (+1056.78%)
Mutual labels:  geospatial
Summitdb
In-memory NoSQL database with ACID transactions, Raft consensus, and Redis API
Stars: ✭ 1,295 (+997.46%)
Mutual labels:  geospatial
Arctern
Stars: ✭ 94 (-20.34%)
Mutual labels:  geospatial
Pyearth
🌐 A lightweight 3D visualization of the earth in 150 lines of Qt/OpenGL
Stars: ✭ 78 (-33.9%)
Mutual labels:  geospatial
Dggridr
Discrete Global Grids for R: Spatial Analysis Done Right
Stars: ✭ 101 (-14.41%)
Mutual labels:  geospatial
Simplification
Very fast LineString simplification using RDP or Visvalingam-Whyatt and a Rust binary
Stars: ✭ 78 (-33.9%)
Mutual labels:  geospatial
Geocube
Tool to convert geopandas vector data into rasterized xarray data.
Stars: ✭ 87 (-26.27%)
Mutual labels:  geospatial
Sno
Distributed version-control for geospatial and tabular data
Stars: ✭ 100 (-15.25%)
Mutual labels:  geospatial
Geoswift
The Swift Geometry Engine.
Stars: ✭ 1,267 (+973.73%)
Mutual labels:  geospatial
Cadence Java Client
Java framework for Cadence Workflow Service
Stars: ✭ 85 (-27.97%)
Mutual labels:  uber
H3 Logo

Build Coverage Status License GoDoc H3 Version

H3-Go

This library provides Golang bindings for the H3 Core Library. For API reference, please see the H3 Documentation.

Usage

Prerequisites

H3-Go requires CGO (CGO_ENABLED=1) in order to be built. Generally, Go should do the right thing when including this library:

The cgo tool is enabled by default for native builds on systems where it is expected to work. It is disabled by default when cross-compiling. You can control this by setting the CGO_ENABLED environment variable when running the go tool: set it to 1 to enable the use of cgo, and to 0 to disable it. The go tool will set the build constraint "cgo" if cgo is enabled. The special import "C" implies the "cgo" build constraint, as though the file also said "// +build cgo". Therefore, if cgo is disabled, files that import "C" will not be built by the go tool. (For more about build constraints see https://golang.org/pkg/go/build/#hdr-Build_Constraints).

If you see errors/warnings like "build constraints exclude all Go files...", then the cgo build constraint is likely disabled; try setting CGO_ENABLED=1 environment variable for your build step.

Installation

golang/dep

dep ensure -add github.com/uber/h3-go

Note: h3-go includes non-go directories that, by default, dep will prune. You can prevent this by including the following prune directive in your Gopkg.toml:

[prune]
	[[prune.project]]
		name = "github.com/uber/h3-go"
		non-go = false
		unused-packages = false

golang/cmd/go

go get github.com/uber/h3-go

Glide

glide install github.com/uber/h3-go

Quickstart

import "github.com/uber/h3-go/v3"

func ExampleFromGeo() {
	geo := h3.GeoCoord{
		Latitude:  37.775938728915946,
		Longitude: -122.41795063018799,
	}
	resolution := 9
	fmt.Printf("%#x\n", h3.FromGeo(geo, resolution))
	// Output:
	// 0x8928308280fffff
}

Notes

API Differences

  • All GeoCoord structs return Latitude and Longitude as degrees, instead of radians.

Some superficial changes have been made relative to the H3 C core API in order to adhere to idiomatic Go styling. Most notable are the following:

  • H3 C API function prefixes of H3 have been dropped to reduce stutter in usage, e.g. h3.ToGeo(h).
  • H3 C functions that convert to H3Index have their names inverted to convert from something else to H3Index, e.g. GeoToH3 is renamed to h3.FromGeo.
  • H3 C API function prefixes of Get have been dropped in support of Golang's Getter naming style.

CGO

The H3 C source code and header files are copied into this project to optimize for portability. By including the C source files in the h3 Go package, there is no need to introduce a build process or a system dependency on an H3 binary. Effectively, this decision makes h3 as easy to use in a Go project as adding it as a dependency with your favorite dependency manager.

Contributing

Pull requests and Github issues are welcome. Please read our contributing guide for more information.

Legal and Licensing

H3-Go is licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].