Skip to content

Instantly share code, notes, and snippets.

@pomadchin
Forked from lossyrob/hilbert-error-test.scala
Last active January 15, 2016 16:12
Show Gist options
  • Save pomadchin/edb17ece2ff89883ccac to your computer and use it in GitHub Desktop.
Save pomadchin/edb17ece2ff89883ccac to your computer and use it in GitHub Desktop.
Hilbert key error
java.lang.IllegalArgumentException: bitSetRange=Pow2LengthBitSetRange[start=size: 4096 bitset: {},level=4096] exceeds 62 bits for a non-negative long.
[info] at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119)
[info] at com.google.uzaygezen.core.ranges.LongRangeHome.toRange(LongRangeHome.java:40)
[info] at com.google.uzaygezen.core.ranges.LongRangeHome.toRange(LongRangeHome.java:27)
[info] at com.google.uzaygezen.core.ranges.RangeUtil.toOrthotope(RangeUtil.java:50)
[info] at com.google.uzaygezen.core.SimpleRegionInspector.assess(SimpleRegionInspector.java:127)
[info] at com.google.uzaygezen.core.BacktrackingQueryBuilder.visit(BacktrackingQueryBuilder.java:121)
[info] at com.google.uzaygezen.core.ZoomingSpaceVisitorAdapter.visit(ZoomingSpaceVisitorAdapter.java:66)
[info] at com.google.uzaygezen.core.CompactHilbertCurve.accept(CompactHilbertCurve.java:182)
[info] at geotrellis.spark.io.index.hilbert.HilbertSpaceTimeKeyIndex.indexRanges(HilbertSpaceTimeKeyIndex.scala:113)
[info] at geotrellis.spark.io.index.hilbert.HilbertSpaceTimeKeyIndexSpec$$anonfun$1$$anonfun$apply$mcV$sp$5.apply$mcV$sp(HilbertSpaceTimeKeyIndexSpec.scala:93)
import geotrellis.spark.io.index._
import geotrellis.spark.io.json._
import spray.json._
it("does not throw"){
val k1 = SpaceTimeKey(0, 0, new DateTime(2000,1,1,0,0,0))
val k2 = SpaceTimeKey(0, 0, new DateTime(2015,12,31,11,59,59))
val kb = KeyBounds(k1, k2)
val kim = HilbertKeyIndexMethod(12)
val ki = kim.createIndex(kb)
ki.indexRanges(kb)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment