Heat map with x, y and Z values

(15 posts) (2 voices)
  1. Niranjan, Member

    Hi MyDBR team,

    I want to plot a heat map with x,y position and change in color proportional to 'z' value.

    Can somebody help me with it.

    Note: These values of x, y are local coordinates

  2. myDBR Team, Key Master

    Are you talking about a contour chart or a headmap on top of the map (Google Maps, OpenStreetMap)?

    --
    myDBR Team

  3. Niranjan, Member

    Yes, thats what I want.

    to put it more detail. I am doing a rough road analysis. I have X, Y position of area and Z value defining the roughness of that area. Now I want to represent all of them in my map increasing color gradient of something depending on the roughness or "z" value.

    thanks for the response.

  4. myDBR Team, Key Master

    This is excactly what a heatmap mode in maps (Google Maps / OpenStreetMap) does. When using the heatmap, you have the latitude, longitude and the PointWeight parameter (equivalent to your z-value).

    --
    myDBR Team

  5. Niranjan, Member

    Ok, how do I use that? Can you point me to some sample code?

    Thanks.

  6. myDBR Team, Key Master

    See heatmap example in the documentation.


    myDBR Team

  7. Niranjan, Member

    I tried using it. But as I said, my X, Y co-ordinates are local positions. They cannot be mapped on global coordinates.
    I just my points to be plotted. That will automatically form a shape of site we are looking.

    How can I do that?

  8. myDBR Team, Key Master

    What do you mean by X and Y being “local positions”? Can you show your data?


    myDBR Team

  9. Niranjan, Member

    '2786500', '2497500', '0'
    '2786500', '2497500', '0'
    '2786500', '2497500', '4'
    '2786500', '2497500', '7'
    '2786500', '2497500', '8'
    '2786500', '2497500', '9'
    '2786500', '2497500', '10'
    '2786500', '2497500', '8'
    '2786500', '2497500', '7'
    '2786500', '2497500', '7'

    That is X, Y and Roughness Index data respective.

    Local I mean, these positions are local to a mine site. those X and Y values are with respect to a reference point we have on site.

  10. myDBR Team, Key Master

    Those positions are map positions, just your own data instead of latitude / longitude? What are they based on?

    Can you take a X/Y pair (like '2786500', '2497500') and place it on a map?

    Can you convert the X/Y values to latitude / longitude?

    --
    myDBR Team

  11. Niranjan, Member

    Those points are of mining site. they are not lat/long values. We have a reference point at site and we calculate X, Y values based on that point.

    When I plot all X,Y positions, I get my mine map. that map is not the global google map. Its just like a diagram on paper.

    No I cannot convert my values into Lat/long.

    All I am asking is, Plot these X, Y values like regular Heatmap but I want extra value to be included to it. i.e. Z value or in my case the roughness value.

  12. myDBR Team, Key Master

    So you do not have an actual map (which has longitude / latitude like Google Maps / OpenStreetMap), but basically an image where you have coordinates (X,Y) and on top of that image you want to draw a heatmap based on the data you have in your database?

    Is this correct?

    --
    myDBR Team

  13. Niranjan, Member

    Yes, exactly.

  14. myDBR Team, Key Master

    OK,
    the easiest solution would be to include a JavaScript library which can draw a heatmap on top of an image. Take a look at the Patrick Wied's heatmap.js. In your report you would generate the JS code to draw the heatmap.

    --
    myDBR Team

  15. Niranjan, Member

    Thank you, will try and update.


Reply

You must log in to post.