1

I have a number of data points in the form of (latitude,longitude,temperature). I am required to render the temperature on a map.

The final result should be similar to the the map here

I used google heat maps for this, and was able to render the data points successfully. The problem however is that the readings are far apart, so each reading appear as a disconnected circle. I could increase the radius of the rendered data points to solve this.

My question is: Is google heat map used to render the temperature correctly? or should I use another api?

Any advice is highly appreciated.

  • you need isochrones example: openweathermap.org/help/tiles.html?opacity=0.4&l=temp – Mapperz Nov 4 '13 at 14:04
  • Thanks all for the replies. The issue is that the data could change on the fly, so I can't use a desktop application for this. One thing I tried was to interpolate the surface. However it seems that I an not doing the interpolation correctly so far. – mkaatr Nov 5 '13 at 7:11
  • I found the approximation functions in one of the websites, and was able to successfully implement and render the result as an image. My problem now is how to use that image as a layer at runtime? – mkaatr Nov 5 '13 at 13:36
  • You can answer your first question then create another question about the run time (real-time) image creation. – Mapperz Nov 5 '13 at 14:28
1

You'll most likely need a full-blown GIS desktop application to render the data correctly:

Open source methods for kriging?

Good luck.

1

The google maps heat map ( currently ) only displays the 'heat' of the point density rather than the Z value.

Your best bet ( as I am doing ) is to investigate gdal_grid which will interpolate your random geo-spacial data onto a grid which then can be used to create an image file ( png / geoTiff etc ) and then display this image.

  • Thanks for the info. I am checking the library right now. It seems the library works under C# which is great. My issue however is that I could not figure out under what namespace the gdal_grid function is. Also I could not find an example. Any advice in this matter is highly appreciated. – mkaatr Nov 5 '13 at 12:52
0

To me the Google heat map does not seem like the best tool to visualize temperature. I'm not sure if the api interpolates your Point data (haven't used it for a while maybe there are new capabilities). Since temperature is a continous phenomenon you want a map with no voids as result. The Google heat map might lead to something like this:

heat map temperature visualization

I once did a temperature map in QGIS. I imported my data (coordinates of measurement stations + temperature) Then there is a function "contours" to interpolate the Point data. My result looked like this:

enter image description here

you could Export that into a kml layer from QGIS. I am sure there are some ways to make it an overlay in googlemaps. In an old blog post of mine I described the process in QGIS in more Detail: http://tmaps.wordpress.com/2010/12/22/visualizing-met-office-temperature-data-of-britain/

0

The code blow shows how you could calculate the value of any point. Simply provide the function with an array of PointXYZ containing the known data. This does not answer the question, however it is a step in figuring out how to do it.

Finally thanks to all for their help and answers.

Public Structure PointXYZ
    Public X As Single
    Public Y As Single
    Public Z As Single
End Structure

Public Function GetZInterpolationForPoint(ByVal X As Single, ByVal Y As Single, ByVal KnownPoints() As PointXYZ, ByVal P As Single) As PointXYZ
    Dim I As Integer

    Dim Sum1 As Single = 0
    Dim Sum2 As Single = 0
    For I = 0 To KnownPoints.Length - 1
        Dim DX As Single = (KnownPoints(I).X - X) ^ 2
        Dim DY As Single = (KnownPoints(I).Y - Y) ^ 2
        Dim LP As Single = (DX + DY) ^ (0.5)
        Sum1 = Sum1 + KnownPoints(I).Z / (LP ^ P)
        Sum2 = Sum2 + (1.0 / (LP ^ P))
    Next

    Dim PT As New PointXYZ
    PT.X = X
    PT.Y = Y
    PT.Z = Sum1 / Sum2
    Return PT
End Function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.