Created
September 1, 2019 22:39
-
-
Save davideanastasia/b6ba2b826d2ee264e87f71be29560860 to your computer and use it in GitHub Desktop.
spatial_beam_02.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Collection<TiledIntervalWindow> assignWindows(AssignContext c) throws Exception { | |
H3Core h3 = H3Core.newInstance(); | |
Point point = c.element().getValue().getPoint(); | |
String hexAddr = h3.geoToH3Address(point.getLatitude(), point.getLongitude(), h3Resolution); | |
TiledIntervalWindow tiw = new TiledIntervalWindow( | |
hexAddr, | |
c.timestamp(), | |
gapDuration); | |
return Lists.newArrayList(tiw); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment