Geospatial mapping: map one state from data from the continental US
Ältere Kommentare anzeigen
Hi,
I'm using Matlab 2014b. I have a gridded data for the entire US in a matrix (621 x 1405). I am calling this matrix 'data'. I made a georasterref using the following code.
R = georasterref();
R.LatitudeLimits=[ 24.062499 49.9375];
R.LongitudeLimits=[-125.0208333 -66.4792];
R.RasterSize=[621 1405]
I can plot the continental US using this code.
geoshow(data, R, 'DisplayType','Surface')
I just want to plot the data that are contained with the CA boarders. I am pretty sure I need to use the filterm function. I have tried multiple different approaches. Some examples of my attempts are below.
Example 1
[latout,lonout,indx] = filterm(californiahi.Lat,californiahi.Lon,data,R)
Example 2
Lat=24.062499:.0416668:49.9375;
Long=-125.0208333:.0416668:-66.4792;
[flat,flon,index]=filterm(Lat,Long,californiahi,data,'allowed');
Any guidance on how to plot only the data in the CA boarders would be very much appreciated.
THANK YOU in advance. Julie
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Create Plots on Maps finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!