MATLAB Answers

0

Contour maps from lat-lon?

Asked by Andrea Cecilia on 20 Jun 2019
Latest activity Commented on by Andrea Cecilia on 25 Jun 2019
Hi to everyone
I need to create contour maps of parameter T (temperature) from a grid of type
Latitude Longitude T
42.44567 12.457393 25.3
... ... ...
I also have a shapefile to put as bakground of these maps.
I don't need to interpolate with a complex algorithm the values, because the grid contained in the file comes from an interpolation algorithm and it is very thick (250 m of resolution). So, it is enough to use something like the inverse of the square of distance to plot the contour maps.
Because I am new in matlab world, can someone give me some tips for starting?
the final objective is obtaining something like this:
atem_bbroma.png
Thank you

  0 Comments

Sign in to comment.

1 Answer

Answer by Aravind Ravikumar on 20 Jun 2019
Edited by Aravind Ravikumar on 20 Jun 2019

Hey, you could use the contour() function (documentation here). More specifically you can use, countour(X,Y,Z) with Latitude as X, Longitude as Y, T as Z. You can also add title to your figure (documentation here).
You can use mapshow() (documentation here) with shaperead() (documentation here) to load your shapefile. You can overlay the figures with hold on or you could try something like this.

  1 Comment

Hi,
I've tried to give
contour(Lat,Lon,T);
where Lat, Lon, T are nx1 arrays containing double values. It gives me the following error:
Error using contour (line 48)
Z must be at least a 2x2 matrix.

Sign in to comment.