Skip to content

gojuno/hexgridgeo-java

Repository files navigation

HexGrid GEO

Basics

GEO wrapper for HexGrid.

Examples

import com.gojuno.hexgrid.*;
import com.gojuno.hexgridgeo.*;

HexGridGeo grid = new HexGridGeo(Orientation.FLAT, 500, ProjectionSM.INSTANCE);
Hex hex = grid.hexAt(new PointGeo(-73.5, 40.3));
long code = grid.hexToCode(hex);
Hex restoredHex = grid.hexFromCode(code);
Hex[] neighbors = grid.hexNeighbors(hex, 2);
Region region = grid.createRegion(new PointGeo[]{
        new PointGeo(-73.0, 40.0), new PointGeo(-74.0, 40.0), new PointGeo(-74.0, 41.0), new PointGeo(-73.0, 41.0));
Hex[] hexesInRegion = region.getHexes();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages