Geospatial mapping: map one state from data from the continental US
显示 更早的评论
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Create Plots on Maps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!