object SpaceFillingCurves
Java interop-friendly facade over the Z2SFC and XZ2SFC space-filling curves.
Inputs are clamped to the WGS84 domain, matching the curves' lenient handling of out-of-bounds coordinates.
Hex outputs delegate to Z2SFC.hexEncode/XZ2SFC.hexEncode, and
left-align the significant bits so lexicographic (truncate-prefix)
comparison over the encoded strings matches numeric comparison of the
underlying index values.
- Alphabetic
- By Inheritance
- SpaceFillingCurves
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
HexRange(lower: String, upper: String) extends Product with Serializable
A contiguous, inclusive range of hex-encoded curve values — Java-interop stand-in for Scala's
IndexRange.A contiguous, inclusive range of hex-encoded curve values — Java-interop stand-in for Scala's
IndexRange.- lower
inclusive lower bound
- upper
inclusive upper bound
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
xz2Hex(minLon: Double, minLat: Double, maxLon: Double, maxLat: Double, g: Short): String
XZ2 cell value for a geometry's envelope at the given
gresolution, hex-encoded viaXZ2SFC.hexEncode(bit-shifted left so the significant bits are left-aligned and truncate-prefix matching works).XZ2 cell value for a geometry's envelope at the given
gresolution, hex-encoded viaXZ2SFC.hexEncode(bit-shifted left so the significant bits are left-aligned and truncate-prefix matching works).- minLon
envelope min longitude, clamped to [-180, 180]
- minLat
envelope min latitude, clamped to [-90, 90]
- maxLon
envelope max longitude, clamped to [-180, 180]
- maxLat
envelope max latitude, clamped to [-90, 90]
- g
XZ2 quad-tree resolution
- returns
the hex-encoded XZ2SFC sequence-code value
-
def
xz2HexRanges(minLon: Double, minLat: Double, maxLon: Double, maxLat: Double, g: Short, maxRanges: Int): List[HexRange]
XZ2 index ranges covering the query envelope at the given
gresolution, hex-encoded viaXZ2SFC.hexEncode.XZ2 index ranges covering the query envelope at the given
gresolution, hex-encoded viaXZ2SFC.hexEncode. Returns inclusiveHexRangepairs; stored values produced byxz2Hexcompare lexicographically within them.- minLon
envelope min longitude, clamped to [-180, 180]
- minLat
envelope min latitude, clamped to [-90, 90]
- maxLon
envelope max longitude, clamped to [-180, 180]
- maxLat
envelope max latitude, clamped to [-90, 90]
- g
XZ2 quad-tree resolution
- maxRanges
rough upper bound on the number of ranges returned; the SFC coarsens (merges) past it, so the cover remains a superset of the envelope — pruning gets less selective, never lossy
- returns
inclusive hex range pairs
-
def
xz2Index(minLon: Double, minLat: Double, maxLon: Double, maxLat: Double, g: Short): Long
XZ2 cell index for lat/lon bounds at the given
gresolution.XZ2 cell index for lat/lon bounds at the given
gresolution. Returns the appropriate XZ2SFC sequence-code.- minLon
envelope min longitude, clamped to [-180, 180]
- minLat
envelope min latitude, clamped to [-90, 90]
- maxLon
envelope max longitude, clamped to [-180, 180]
- maxLat
envelope max latitude, clamped to [-90, 90]
- g
XZ2 quad-tree resolution
- returns
the XZ2SFC sequence-code value
-
def
z2Hex(lon: Double, lat: Double): String
Z2 cell value for a single (lon, lat) point, hex-encoded via
Z2SFC.hexEncode(left-shifted).Z2 cell value for a single (lon, lat) point, hex-encoded via
Z2SFC.hexEncode(left-shifted).- lon
longitude, clamped to [-180, 180]
- lat
latitude, clamped to [-90, 90]
- returns
the hex-encoded Z2SFC index value
-
def
z2HexRanges(minLon: Double, minLat: Double, maxLon: Double, maxLat: Double, maxRanges: Int): List[HexRange]
Z2 index ranges covering the provided lat/lon bounds, hex-encoded via
Z2SFC.hexEncode.Z2 index ranges covering the provided lat/lon bounds, hex-encoded via
Z2SFC.hexEncode. Returns inclusiveHexRangepairs; stored values produced byz2Hexthat compare lexicographically.- minLon
envelope min longitude, clamped to [-180, 180]
- minLat
envelope min latitude, clamped to [-90, 90]
- maxLon
envelope max longitude, clamped to [-180, 180]
- maxLat
envelope max latitude, clamped to [-90, 90]
- maxRanges
rough upper bound on the number of ranges returned; the SFC coarsens (merges) past it, so the cover remains a superset of the envelope — pruning gets less selective, never lossy
- returns
inclusive hex range pairs
-
def
z2Index(lon: Double, lat: Double): Long
Z2 cell index for a single (lon, lat) point at the default Z2SFC precision (31 bits/axis, 62-bit positive Long).
Z2 cell index for a single (lon, lat) point at the default Z2SFC precision (31 bits/axis, 62-bit positive Long).
- lon
longitude, clamped to [-180, 180]
- lat
latitude, clamped to [-90, 90]
- returns
the Z2SFC index value
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated