Skip to content
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

renderPng(colorMap) treats Int rasters as Double #2022

Closed
echeipesh opened this issue Feb 17, 2017 · 2 comments
Closed

renderPng(colorMap) treats Int rasters as Double #2022

echeipesh opened this issue Feb 17, 2017 · 2 comments
Assignees

Comments

@echeipesh
Copy link
Contributor

def renderPng(colorRamp: ColorRamp): Png = {
if(self.cellType.isFloatingPoint) {
val histogram = self.histogram
val quantileBreaks = histogram.quantileBreaks(colorRamp.numStops)
renderPng(new IntColorMap(quantileBreaks.zip(colorRamp.colors).toMap).cache(histogram))
} else {
val histogram = self.histogramDouble
renderPng(ColorMap.fromQuantileBreaks(histogram, colorRamp))
}
}

@echeipesh
Copy link
Contributor Author

pomadchin added a commit to pomadchin/geotrellis that referenced this issue Feb 22, 2017
Signed-off-by: Grigory Pomadchin <gr.pomadchin@gmail.com>
@pomadchin pomadchin self-assigned this Feb 22, 2017
@pomadchin
Copy link
Member

pomadchin commented Feb 22, 2017

Rob already mentioned this bug #1957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants