
geotrellis.spark.io.index.Index.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geotrellis-spark_2.10 Show documentation
Show all versions of geotrellis-spark_2.10 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
The newest version!
package geotrellis.spark.io.index
object Index {
/** Encode an index value as a string */
def encode(index: Long, max: Int): String =
index.toString.reverse.padTo(max, '0').reverse
/** The number of digits in this index */
def digits(x: Long): Int =
if (x < 10) 1 else 1 + digits(x/10)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy