Code Monkey home page Code Monkey logo

h3-java's Introduction

H3-Java

Build Status Coverage Status License Maven Central

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

Usage

Add it to your pom.xml:

<dependency>
    <groupId>com.uber</groupId>
    <artifactId>h3</artifactId>
    <version>3.0.3</version>
</dependency>

Or, using Gradle:

compile("com.uber:h3:3.0.3")

Encode a location into a hexagon address:

H3Core h3 = H3Core.newInstance();

double lat = 37.775938728915946;
double lng = -122.41795063018799;
int res = 9;

String hexAddr = h3.geoToH3Address(lat, lng, res);

Decode a hexagon address into coordinates:

List<GeoCoord> geoCoords = h3.h3ToGeoBoundary(hexAddr);

Supported Operating Systems

H3-Java provides bindings to the H3 library, which is written in C. The built artifact supports the following:

Operating System Architectures
Linux x64, x86, ARM64, ARMv5, ARMv7, MIPS, MIPSEL, PPC64LE, s390x
Windows x64, x86
Darwin (Mac OSX) x64
Android ARM, ARM64

You may be able to build H3-Java locally if you need to use an operating system or architecture not listed above.

Development

Building the library requires a JDK, Maven, CMake, and a C compiler. To install to your local Maven cache, run:

mvn install

To build the library, run:

mvn package

Additional information on how the build process works is available in the build process documentaiton.

Javadocs

To build Javadocs documentation:

mvn site

Then open the file target/site/apidocs/index.html.

Benchmarking

To run benchmarks, either execute them from IntelliJ or run the following from shell: (Replace the class name as needed)

mvn exec:exec -Dexec.executable="java" -Dexec.args="-classpath %classpath com.uber.h3core.benchmarking.H3CoreBenchmark" -Dexec.classpathScope="test"

Contributing

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

Before we can merge your changes, you must agree to the Uber Contributor License Agreement.

Legal and Licensing

H3-Java is licensed under the Apache 2.0 License.

DGGRID Copyright (c) 2015 Southern Oregon University

h3-java's People

Contributors

dfellis avatar isaacbrodsky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.