All Downloads are FREE. Search and download functionalities are using the official Maven repository.

geotrellis.spark.io.index.Index.scala Maven / Gradle / Ivy

Go to download

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