berlin.softwaretechnik.geojsonrenderer.map.TileId.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geojsonrenderer_2.13 Show documentation
Show all versions of geojsonrenderer_2.13 Show documentation
A command line tool to render geojson file on top of map tiles.
The newest version!
package berlin.softwaretechnik.geojsonrenderer.map
case class TileId(x: Int, y: Int, z: Int) {
assert(0 <= y && y < upperCoordinateLimit, s"At zoom level $z, y must be on [0, $upperCoordinateLimit). $this")
def normalized: TileId = copy(Math.floorMod(this.x, upperCoordinateLimit))
def normalizedPath: String = normalized.path
private def upperCoordinateLimit: Int = 1 << z
private def path: String = s"$z/$x/$y"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy