Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Apr 28, 2018
1 parent 1c71191 commit dbf169c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spark/src/main/scala/geotrellis/spark/KeyBounds.scala
Expand Up @@ -96,8 +96,8 @@ object Bounds {
.map{ case (k, tile) => Bounds(k, k) }
.fold(EmptyBounds) { _ combine _ }

implicit val catsFunctorImpl: Functor[Bounds] = new Functor[Bounds] {
override def map[A, B](functor: Bounds[A])(f: A => B): Bounds[B] = functor match {
implicit val boundsFunctor: Functor[Bounds] = new Functor[Bounds] {
override def map[A, B](fa: Bounds[A])(f: A => B): Bounds[B] = fa match {
case EmptyBounds => EmptyBounds
case KeyBounds(min, max) => KeyBounds(f(min), f(max))
}
Expand Down
6 changes: 3 additions & 3 deletions spark/src/main/scala/geotrellis/spark/TileLayerMetadata.scala
Expand Up @@ -108,9 +108,9 @@ object TileLayerMetadata {
t1.combine(t2)
}

implicit val catsFunctorImpl: Functor[TileLayerMetadata] = new Functor[TileLayerMetadata] {
override def map[A, B](fa: TileLayerMetadata[A])(f: A => B): TileLayerMetadata[B] =
fa.copy(bounds=fa.bounds.map(f))
implicit val tileLayerMetadataFunctor: Functor[TileLayerMetadata] = new Functor[TileLayerMetadata] {
def map[A, B](fa: TileLayerMetadata[A])(f: A => B): TileLayerMetadata[B] =
fa.copy(bounds = fa.bounds.map(f))
}

private def collectMetadata[
Expand Down
7 changes: 3 additions & 4 deletions spark/src/main/scala/geotrellis/spark/filter/ToSpatial.scala
Expand Up @@ -36,16 +36,15 @@ object ToSpatial {
* to define additional constraints on Metadata. M should
* depend on a K type (M[K]), and two type classes should
* be provided: [[geotrellis.util.Component]], to extract key bounds
* from M[K], and cats.Functor to map M[K] to M[SpatialKey].
* from M[K], and [[cats.Functor]] to map M[K] to M[SpatialKey].
*
* For those reading the source code directly,
* {{{K: λ[α => M[α] => Functor[M]]: λ[α => Component[M[α], Bounds[α]]}}}
* {{{K: λ[α => Component[M[α], Bounds[α]]}}}
* is further syntax sugar on top of the usual {{{K: ...}}} pattern.
* It expands into the following Scala implicit evidences:
*
* {{{
* ev0: Component[M[K], Bounds[K]],
* ev1: M[K] => Functor[M]
* ev0: Component[M[K], Bounds[K]]
* }}}
*
* @param rdd
Expand Down

0 comments on commit dbf169c

Please sign in to comment.