Kitware / minerva

Minerva: client/server/services for analysis and visualization
Apache License 2.0
36 stars 14 forks source link

Add color legend support to ktile raster layer #451

Closed matthewma7 closed 6 years ago

matthewma7 commented 7 years ago

And some code refactoring

2017-10-17_13-37-18

manthey commented 6 years ago

Should there be a legend even when the colors aren't custom? Also, it seems like there should be a way to modify the default -- for instance, if I want a black-to-white continuous scale with different min and max values.

aashish24 commented 6 years ago

@matthewma7 do you have an answer for @manthey's question above?

matthewma7 commented 6 years ago

@aashish24 I meant to ask @dorukozturk when I got a chance. I guess I can ask him now. Hi @dorukozturk, I don't you may not know the answer fully, but since you have more experience with Mapnik than I do, I am wondering that is the default Mapnik render behavior without style predictable? I mean, when there are three bands, it will be rendered to color. When there is, in this case, one band, does it always use the same greyscale? Is the greyscale ordinal or continuous?

dorukozturk commented 6 years ago

@matthewma7 Here they list bunch of options. I think your options are

"The colorizer also has default color, which input values will be converted to if they don't match any stops. The colorizer also has a default mode, which can be inherited by the stops." From the docs.

aashish24 commented 6 years ago

When there is, in this case, one band, does it always use the same greyscale? Is the greyscale ordinal or continuous

greyscale is assumed when there is only one band. You can look into QGIS which is the industry standard tool.

greyscale would be continuous (think of height map)

matthewma7 commented 6 years ago

After a discussion with @aashish24, we decided to implement legend for default raster styling in the separate PR, because it might involve something with some complexity outside the current changes. An issue has been created for that request, https://github.com/Kitware/minerva/issues/459

aashish24 commented 6 years ago

LGTM if @manthey also approves it.