MVN

io.github.markrileybot : geokey

Maven & Gradle

Jun 20, 2022
1 stars

geokey · # geokey K Dimensional Z-Order curve utils. [![Build Status](https://travis-ci.org/markrileybot/geokey.svg?branch=master)](https://travis-ci.org/markrileybot/geokey) [![Coverage Status](https://coveralls.io/repos/github/markrileybot/geokey/badge.svg?branch=master)](https://coveralls.io/github/markrileybot/geokey?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey) ## Building ./gradlew build ## Gradle dependency See https://search.maven.org/artifact/io.github.markrileybot/geokey/ ## Using ### Use built in keys to make geohashes ```java import org.geokey.GeoKey; // Make a geo hash key String key = new GeoKey().setLatitude(48.669).setLongitude(-4.329).toString(); // "gbsuv7ztqzpts82uzfwq5e1bp" // parse a geo hash key GeoKey gk = new GeoKey("gbsuv7ztqzpts82uzfwq5e1bp"); ``` ### Make a special purpose K-Dimensional key ```java public class GeoTimeKey extends KDKey { private static final KDKeySpec spec = new KDKeySpec.Builder() .addDim(-180, 180, 1) .addDim(-90, 90, 1) .addDim(0, 1L << 62, 1) .setAlphabet(Alphabet.GEO_TIME_HASH) .build(); public GeoTimeKey() { super(spec); } public GeoTimeKey(String s) { super(spec, s); } public GeoTimeKey(byte[] s) { super(spec, s); } public GeoTimeKey setLatitude(double latitude) { set(1, latitude); return this; } public double getLatitude() { return super.get(1); } public GeoTimeKey setLongitude(double longitude) { set(0, longitude); return this; } public double getLongitude() { return super.get(0); } public GeoTimeKey setTime(long time) { set(2, time); return this; } public long getTime() { return (long) get(2); } } ```

<dependency>
    <groupId>io.github.markrileybot</groupId>
    <artifactId>geokey</artifactId>
    <version>0.1.0</version>
</dependency>
Copy
pom.xml
Table Of Contents

Latest Version

Choose a version of io.github.markrileybot : geokey to add to Maven or Gradle - Latest Versions:

  • Latest Stable: 0.1.0

All Versions

Choose a version of io.github.markrileybot : geokey to add to Maven or Gradle - All Versions:

Version Vulnerabilities Updated
0.1.x
geokey-0.1.0
0.0.x
geokey-0.0.5

How to add a dependency to Maven

Add the following io.github.markrileybot : geokey maven dependency to the pom.xml file with your favorite IDE (IntelliJ / Eclipse / Netbeans):

<dependency>
    <groupId>io.github.markrileybot</groupId>
    <artifactId>geokey</artifactId>
    <version>0.1.0</version>
</dependency>

How to add a dependency to Gradle

Gradle Groovy DSL: Add the following io.github.markrileybot : geokey gradle dependency to your build.gradle file:

implementation 'io.github.markrileybot:geokey:0.1.0'

Gradle Kotlin DSL: Add the following io.github.markrileybot : geokey gradle kotlin dependency to your build.gradle.kts file:

implementation("io.github.markrileybot:geokey:0.1.0")

How to add a dependency to SBT Scala

SBT Scala: Add the following io.github.markrileybot : geokey sbt scala dependency to your build.sbt file:

libraryDependencies += "io.github.markrileybot" % "geokey" % "0.1.0"

Advertisement