New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiband histogram methods #1784

Merged
merged 3 commits into from Nov 10, 2016

Conversation

Projects
None yet
2 participants
@echeipesh
Contributor

echeipesh commented Nov 8, 2016

Adds method extensions for histogram and related stats functions to MultibandTile and RDD[(K, MultibandTile)].

Because MultibandTile is essentially a Vector[Tile] the extension methods have little choice than return an Array of their Tile counterpart.

Fixes: #1773

@lossyrob

Small nitpick, otherwise +1

* Create a histogram from double values in a raster.
*/
def histogramDouble(): Array[Histogram[Double]] =
self.bands.map(_.histogramDouble(StreamingHistogram.DEFAULT_NUM_BUCKETS)).toArray

This comment has been minimized.

@lossyrob

lossyrob Nov 8, 2016

Member

This should just pass to histogramDouble(StreamingHistogram.DEFAULT_NUM_BUCKETS) - it's a good practice to only let the last overload do any actual work, so that code changes will only have to ever happen there.

@echeipesh echeipesh merged commit d8d4315 into locationtech:master Nov 10, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment