Skip to content

adrianulbona/jts-discretizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages