Skip to content

Commit

Permalink
Add credit, source
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain committed May 29, 2024
1 parent 038dead commit 025bfac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/scala/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ package object geoprocessing {
type RasterLayer = TileLayerCollection[SpatialKey]
type GeoJSONString = String

// The following is taken from https://github.com/geotrellis/geotrellis-server/tree/feature/stac-example-simple/stac-simple-example/src/main/scala/geotrellis/example by @pomadchin

implicit class AssetsMapOps(private val assets: Map[String, StacAsset]) extends AnyVal {
def select(selector: Regex): Option[StacAsset] = assets.find { case (k, _) => selector.findFirstIn(k).nonEmpty }.map(_._2)
}
Expand Down

0 comments on commit 025bfac

Please sign in to comment.