[Nanocubes-discuss] Heatmap color range resolving

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Nanocubes-discuss] Heatmap color range resolving

Vjeran Marcinko
Hi,

I would just like to get confirmation/explanation on how does
currently Javascript web heatmap resolves colors for each value
fetched from tile drill query?

As I see it in NanocubeLayer.js (L.NanocubeLayer.prototype.drawTile
function), during drawing of each individual tile *on that specific
zoom level*, it just updates value range (min/max) by looking if
current tile's data has boudnaries wider than currently set, and uses
that value range later while drawing canvas for that specific tile.
Meaning, if initial tile has small difference between min/max values,
and some later tile on that same zoom level can have much larger
difference between min/max values, the colors drawn on the screen
would definitely not represent well the real values fetched from
nanocube.

As I see it, it would be somehow necessary to fetch all the values
from nanocube before drawing any tile, thus we could resolve what are
real min/max values before drawing takes places for any tile. Am I
right? (but I don't see some elegant way on how to do it currently
using leaflet API)

-Vjeran

_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
Reply | Threaded
Open this post in threaded view
|

Re: [Nanocubes-discuss] Heatmap color range resolving

salivian
Yes you are right .... the current nanocubelayer.js does try to figure out the min max before rendering but it's a not a pretty solution and it forces some kind of refresh when updating.

so I am working on a new version that does not use tile canvas :)


Horace

On Fri, Feb 20, 2015 at 5:21 AM, Vjeran Marcinko <[hidden email]> wrote:
Hi,

I would just like to get confirmation/explanation on how does
currently Javascript web heatmap resolves colors for each value
fetched from tile drill query?

As I see it in NanocubeLayer.js (L.NanocubeLayer.prototype.drawTile
function), during drawing of each individual tile *on that specific
zoom level*, it just updates value range (min/max) by looking if
current tile's data has boudnaries wider than currently set, and uses
that value range later while drawing canvas for that specific tile.
Meaning, if initial tile has small difference between min/max values,
and some later tile on that same zoom level can have much larger
difference between min/max values, the colors drawn on the screen
would definitely not represent well the real values fetched from
nanocube.

As I see it, it would be somehow necessary to fetch all the values
from nanocube before drawing any tile, thus we could resolve what are
real min/max values before drawing takes places for any tile. Am I
right? (but I don't see some elegant way on how to do it currently
using leaflet API)

-Vjeran

_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net


_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
Reply | Threaded
Open this post in threaded view
|

Re: [Nanocubes-discuss] Heatmap color range resolving

Vjeran Marcinko
I noticed the bug with canvas pixel colors when I had heatmap drawn
for my computer-generated data which show some regular heatmap shapes
due to generator algorithms, thus it was easy to spot the problems
there, whereas with natural data it is not so easy to spot the problem
since they are irregular.

Anyway, I already have majority of my own JS/web UI rebuilt (using
React.js which is hot nowadays, but it isn't so crucial here since
leaflet and D3 zooming are not so compatibile with it), because I
wanted to get acquainted that way better with nanocubes, so I am
anxious to hear what other approach you plan to use to draw heatmap
instead of tile canvas, thus I could also check it out?

Vjeran

On Mon, Feb 23, 2015 at 3:39 PM, Horace Ip <[hidden email]> wrote:

> Yes you are right .... the current nanocubelayer.js does try to figure out
> the min max before rendering but it's a not a pretty solution and it forces
> some kind of refresh when updating.
>
> so I am working on a new version that does not use tile canvas :)
>
>
> Horace
>
> On Fri, Feb 20, 2015 at 5:21 AM, Vjeran Marcinko <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> I would just like to get confirmation/explanation on how does
>> currently Javascript web heatmap resolves colors for each value
>> fetched from tile drill query?
>>
>> As I see it in NanocubeLayer.js (L.NanocubeLayer.prototype.drawTile
>> function), during drawing of each individual tile *on that specific
>> zoom level*, it just updates value range (min/max) by looking if
>> current tile's data has boudnaries wider than currently set, and uses
>> that value range later while drawing canvas for that specific tile.
>> Meaning, if initial tile has small difference between min/max values,
>> and some later tile on that same zoom level can have much larger
>> difference between min/max values, the colors drawn on the screen
>> would definitely not represent well the real values fetched from
>> nanocube.
>>
>> As I see it, it would be somehow necessary to fetch all the values
>> from nanocube before drawing any tile, thus we could resolve what are
>> real min/max values before drawing takes places for any tile. Am I
>> right? (but I don't see some elegant way on how to do it currently
>> using leaflet API)
>>
>> -Vjeran
>>
>> _______________________________________________
>> Nanocubes-discuss mailing list
>> [hidden email]
>>
>> http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
>
>
>
> _______________________________________________
> Nanocubes-discuss mailing list
> [hidden email]
> http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
>

_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net