Region Index
class RegionIndex
A spatial index to look up in which region a given geo position is located fast.
Construct with RegionIndex.Companion.deserializeFrom.
Functions
Link copied to clipboard
fun getContainingIds(minLongitude: Double, minLatitude: Double, maxLongitude: Double, maxLatitude: Double): Set<String>
Identify which countries are guaranteed to contain the given bounding box fully. The given bounding box may wrap around the 180th longitude, e.g. minLongitude = 170 and maxLongitude = -170.
Link copied to clipboard
fun getIntersectingIds(minLongitude: Double, minLatitude: Double, maxLongitude: Double, maxLatitude: Double): Set<String>
Identify which countries may intersect with the given bounding box. In other words, any point within the given bounding box can only be in any of the returned countries (or none).
Link copied to clipboard
Serialize this RegionIndex to the given sink