No description, website, or topics provided.
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
img
src
.gitignore
.travis.yml
LICENSE
README.md
lombok.config
pom.xml

README.md

jts-discretizer

Build Status Coverage Status Maven Central

This is a tiny Java 8 library able to convert JTS geometries to a set of GeoHashes with arbitrary precision (<12).

A GeoHash-based Mallorca discretization looks like:

alt tag

The precision used is 7 - notice that the GeoHash set is reduced if all children of a certain GeoHash are present.

Maven:

<dependency>
    <groupId>io.github.adrianulbona</groupId>
    <artifactId>jts-discretizer</artifactId>
    <version>0.1.0</version>
</dependency>

Code sample:

final Geometry geometry = ...
final DiscretizerFactory discretizerFactory = new DiscretizerFactoryImpl();
final GeometryDiscretizer<Geometry> discretizer = discretizerFactory.discretizer(geometry);
final Set<GeoHash> geoHashes = discretizer.apply(geometry, 7);