Results 1 to 10 of 23

Thread: Heatmaps

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Community Leader Jaxilon's Avatar
    Join Date
    Nov 2009
    Location
    A beach in Ecuador
    Posts
    5,548

    Default

    What is your goal in doing this Hai? You said it was work related so I'm wondering what the purpose is. That might help me to understand what bounding boxes are too
    “When it’s over and you look in the mirror, did you do the best that you were capable of? If so, the score does not matter. But if you find that you did your best you were capable of, you will find it to your liking.” -John Wooden

    * Rivengard * My Finished Maps * My Challenge Maps * My deviantArt

  2. #2
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    Quote Originally Posted by Jaxilon View Post
    What is your goal in doing this Hai? You said it was work related so I'm wondering what the purpose is. That might help me to understand what bounding boxes are too
    Heatmaps are a way of showing data that has a lot of overlap or clustering and where the density of that overlap/clustering is the important thing. In my case, I'm working with a GIS Server. It receives requests for sections of a map along the lines of: "Give me the map from N 40° to N 50° and E 130° to E 120°". That range of coordinates defines a "box" that forms the "boundary" of the request and we call it a Bounding Box. I added the ability to log the bounding boxes of requests so the people running a server can figure out which parts of the map are under higher load and might benefit from more caching.

    Obviously this produces a data set that is just a LOT of overlapping boxes which will cover each other up. So you can't just display them normally. So I took the Heatmap we already had, which just worked with points, and made it work with other geometries. But all my data was just boxes, and properly rasterizing geometries is rather more complex than just filling a box, so I cheated and made it render the bounding box of the geometry (The box that just fits the geometry) rather than the geometry itself. This was fast and easy. the result is the top image, you can see where more requests were made as the heatmap is brighter.

    Adding support for Line Strings wasn't that hard either, and I thought it would look cool, so I did it on my own time. It's useful for showing things like traffic levels if you use a set of routes as the input features (as in the case of my pizza delivery map). When I have time, I plan to add proper support for Polygons/Multipolygons as well to round it all out.

    Here's an illustration of Bounding Boxes:

    Click image for larger version. 

Name:	path3914.png 
Views:	152 
Size:	40.1 KB 
ID:	50392

    The red box is the bounding box for the grey polygon in the coordinate system shown by the grid. The green and blue shapes are the bounding boxes of that same polygon in other coordinate systems, transformed into the coordinate system of the image.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •