geotrellis/geotrellis — pull request #649 by lossyrob (2013-11-22 04:14:38+00:00)
Title: Refactored Rendering code out to it's own folder under root.

Also renamed .histogram to .tileHistograms, and made a
.histogram that converges, since

```scala
val breaks =
layerNames
.zip(weightValues)
.map { case (name,weight) =>
RasterSource(name,re) * weight
}
.reduce(_+_)
.histogram
.converge
.map(_.getQuantileBreaks(numBreaks))
.map { breaks =>
val breaksArray = breaks.mkString("[", ",", "]")
s"""{ "classBreaks" : $breaksArray }"""
}
```

feels unnatural to have a converge in there, where

```scala
val breaks =
layerNames
.zip(weightValues)
.map { case (name,weight) =>
RasterSource(name,re) * weight
}
.reduce(_+_)
.histogram
.map(_.getQuantileBreaks(numBreaks))
.map { breaks =>
val breaksArray = breaks.mkString("[", ",", "]")
s"""{ "classBreaks" : $breaksArray }"""
}
```

seems more natural of an API.

This means to get means over tiles or something like that, you would do:

```scala
val breaks =
RasterSource("layerName")
.tileHistograms
.map(_.mean)
.reduce(_*_)
```

not that the actual result of that example would be useful.