Skip to content

Instantly share code, notes, and snippets.

@moradology
Last active August 29, 2015 14:19
Show Gist options
  • Save moradology/b99b5ec0e2818651966a to your computer and use it in GitHub Desktop.
Save moradology/b99b5ec0e2818651966a to your computer and use it in GitHub Desktop.
def readTile[K: TileReader: JsonFormat: ClassTag](layerId: LayerId): K => Tile = {
val accumuloLayerMetaData = metaDataCatalog.read(layerId)
val keyBounds = attributeStore.read[KeyBounds[K]](layerId, "keyBounds")
val index = attributeStore.read[KeyIndex[K]](layerId, "keyIndex")
implicitly[TileReader[K]].read(instance, layerId, accumuloLayerMetaData, index)(_)
}
val tile = (catalog.readTile[SpaceTimeKey](layerId))(key) // Throws
val tile = catalog.readTile[SpaceTimeKey](layerId)(key) // Throws
val tile = catalog.readTile[SpaceTimeKey](layerId).apply(key) // Works
val getTile = catalog.readTile[SpaceTimeKey](layerId); getTile(key) // Works
not enough arguments for method readTile: (implicit evidence$9: geotrellis.spark.io.accumulo.TileReader[geotrellis.spark.SpaceTimeKey], implicit evidence$10: spray.json.JsonFormat[geotrellis.spark.SpaceTimeKey], implicit evidence$11: scala.reflect.ClassTag[geotrellis.spark.SpaceTimeKey])geotrellis.spark.SpaceTimeKey => geotrellis.raster.Tile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment