⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 map.html

📁 m_map是加拿大学者编写的一个在matlab上绘地图的软件
💻 HTML
📖 第 1 页 / 共 3 页
字号:
  <ol>    <li> <a href="private/mapug.html#p2.1">Azimuthal projections</a></li>    <li> <a href="private/mapug.html#p2.2">Cylindrical andPseudo-cylindrical projections</a></li>    <li> <a href="private/mapug.html#p2.3">Conic projections</a></li>    <li> <a href="private/mapug.html#p2.4">Miscellaneous globalprojections</a></li>    <li> <a href="private/mapug.html#p2.5">Yeah, but which projectionshould I use?</a></li>    <li> <a href="private/mapug.html#p2.6">Map scales</a></li>    <li><a href="./private/mapug.html#p2.7">Map coordinate systems-geographic and geomagnetic</a> <br>    </li>  </ol>  <li> <a href="private/mapug.html#p3">Coastlines and Bathymetry</a></li>  <ol>    <li> <a href="private/mapug.html#p3.1">Coastline options</a><img src="./private/new.gif"></li>    <li> <a href="private/mapug.html#p3.2">Topography/Bathymetryoptions</a></li>  </ol>  <li> <a href="private/mapug.html#p4">Customizing the axes</a></li>  <ol>    <li> <a href="private/mapug.html#p4.1">Grid lines and labels</a></li>    <li> <a href="private/mapug.html#p4.2">Titles and x/ylabels</a></li>    <li> <a href="private/mapug.html#p4.3">Legend Boxes&nbsp;</a></li>  </ol>  <li> <a href="private/mapug.html#p5">Adding your own data</a></li>  <ol>    <li> <a href="private/mapug.html#p5.3">Drawing lines, text,arrows, patches, hatches, speckles, and contours</a><img src="./private/new.gif"></li>    <li><a href="private/mapug.html#p5.2new">Drawing images and p_color      </a> </li>    <li> <a href="private/mapug.html#p5.4">Drawing tracklines</a></li>    <li> <a href="private/mapug.html#p5.5">Drawing range rings andgeodesics</a><img src="./private/new.gif"></li>    <li> <a href="private/mapug.html#p5.1">Convertinglongitude/latitude to projection coordinates</a></li>    <li> <a href="private/mapug.html#p5.2">Converting projectioncoordinates to longitude/latitude</a></li>    <li> <a href="private/mapug.html#p5.6">Computing distances betweenpoints&nbsp;</a></li>  </ol>  <li> <a href="private/mapug.html#p6">More complex plots</a></li>  <li> <a href="private/mapug.html#p13">Removing data from a plot</a></li>  <li> <a href="private/mapug.html#p7">Adding your own coastlines</a></li>  <ol>    <li> <a href="private/mapug.html#p7.1">DCW political boundaries</a></li>  </ol>  <li> <a href="private/mapug.html#p8">Adding your owntopography/bathymetry</a></li>  <ol>    <li> <a href="private/mapug.html#p8.1">Sandwell and SmithBathymetry</a></li>  </ol>  <li> <a href="private/mapug.html#p9">Using TerrainBase 5-minuteor ETOPO2 2-minute global bathymetry/topography </a></li>  <li> <a href="private/mapug.html#p9.5">Using the GSHHShigh-resolution coastline database</a></li>  <ol>    <li> <a href="private/mapug.html#p9.6">Installing GSHHS</a></li>    <li> <a href="private/mapug.html#p9.7">Using GSHHS effectively</a></li>  </ol>  <li> <a href="private/mapug.html#p10">M_Map toolbox contents anddescription</a></li>  <li> <a href="private/mapug.html#p11">Known Problems and Bugs</a></li>  <li> <a href="private/mapug.html#p12">Changes since lastrelease&nbsp;</a> <img src="./private/new.gif"> </li></ol>For information, help, suggestions, or bug reports, contact <a href="http://www.eos.ubc.ca/people/faculty/pawlowicz/">Rich Pawlowicz </a>,(<a href="mailto:rich@eos.ubc.ca"> rich@eos.ubc.ca </a>) <br><hr> <br>&nbsp;<h2> Acknowledgements</h2>&nbsp;A number of people have helped out with suggestions, code fixes,etc.&nbsp; I am especially grateful for the work done by E. Firing, D.Byrne,&nbsp; M. Mann,&nbsp; J. Pringle, and J. E. Nilsen who have allcontributed code.<p> </p><hr><h2> <a name="examples"></a>Examples</h2><h4><a name="1._M_Map_Logo"></a> 1. M_Map Logo</h4><pre>m_proj('ortho','lat',48','long',-123');<br>m_coast('patch','r');<br>m_grid('linest','-','xticklabels',[],'yticklabels',[]);<br>patch(.55*[-1 1 1 -1],.25*[-1 -1 1 1]-.55,'w');<br>text(0,-.55,'M\_Map','fontsize',25,'color','b',...<br>&nbsp;&nbsp; 'vertical','middle','horizontal','center');<br>set(gcf,'units','inches','position',[2 2 3 3]);<br>set(gcf,'paperposition',[3 3 3 3]);</pre><center><img src="./private/mlogo.gif"> </center>&nbsp;<h4><a name="2._Lambert_Conformal_Conic_projection_of"></a> <a name="e2"></a>2.Lambert Conformal Conic projection of North American Topography</h4><pre>m_proj('lambert','long',[-160 -40],'lat',[30 80]);<br>m_coast('patch',[1 .85 .7]);<br>m_elev('contourf',[500:500:6000]);<br>m_grid('box','fancy','tickdir','in');<br>colormap(flipud(copper));</pre><center><img src="./private/exlamber.gif"> </center>&nbsp;<h4><a name="3._Stereographic_projection_of_North"></a> 3.Stereographicprojection of North Polar regions</h4><pre>% Note that coastline is drawn OVER the grid because of the order in which<br>% the two routines are called<br><br>m_proj('stereographic','lat',90,'long',30,'radius',25);<br>m_elev('contour',[-3500:1000:-500],'edgecolor','b');<br>m_grid('xtick',12,'tickdir','out','ytick',[70 80],'linest','-');<br>m_coast('patch',[.7 .7 .7],'edgecolor','r');</pre><center><img src="./private/exster.gif"> </center>&nbsp;<h4><a name="4._Two_Interrupted_Projections_of_the"></a> <a name="e4"></a>4.Two Interrupted Projections of the World's Oceans</h4><pre>subplot(211);<br>Slongs=[-100 0;-75 25;-5 45; 25 145;45 100;145 295;100 290];<br>Slats= [&nbsp; 8 80;-80&nbsp; 8; 8 80;-80&nbsp;&nbsp; 8; 8&nbsp; 80;-80&nbsp;&nbsp; 0;&nbsp; 0&nbsp; 80];<br>for l=1:7,<br>&nbsp;m_proj('sinusoidal','long',Slongs(l,:),'lat',Slats(l,:));<br>&nbsp;m_grid('fontsize',6,'xticklabels',[],'xtick',[-180:30:360],...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ytick',[-80:20:80],'yticklabels',[],'linest','-','color',[.9 .9 .9]);<br>&nbsp;m_coast('patch','g');<br>end;<br>xlabel('Interrupted Sinusoidal Projection of World Oceans');<br>% In order to see all the maps we must undo the axis limits set by m_grid calls:<br>set(gca,'xlimmode','auto','ylimmode','auto');<br><br>subplot(212);<br>Slongs=[-100 43;-75 20; 20 145;43 100;145 295;100 295];<br>Slats= [&nbsp; 0&nbsp; 90;-90&nbsp; 0;-90&nbsp;&nbsp; 0; 0&nbsp; 90;-90&nbsp;&nbsp; 0;&nbsp; 0&nbsp; 90];<br>for l=1:6,<br>&nbsp;m_proj('mollweide','long',Slongs(l,:),'lat',Slats(l,:));<br>&nbsp;m_grid('fontsize',6,'xticklabels',[],'xtick',[-180:30:360],...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ytick',[-80:20:80],'yticklabels',[],'linest','-','color','k');<br>&nbsp;m_coast('patch',[.6 .6 .6]);<br>end;<br>xlabel('Interrupted Mollweide Projection of World Oceans');<br>set(gca,'xlimmode','auto','ylimmode','auto');</pre><center><img src="./private/exsinus.gif"> </center>&nbsp;<h4><a name="5._Oblique_Mercator_Projection_with"></a> 5. ObliqueMercatorProjection with quiver and contour data</h4><pre>%% Nice looking data<br>[lon,lat]=meshgrid([-136:2:-114],[36:2:54]);<br>u=sin(lat/6);<br>v=sin(lon/6);<br><br>m_proj('oblique','lat',[56 30],'lon',[-132 -120],'aspect',.8);<br><br>subplot(121);<br>m_coast('patch',[.9 .9 .9],'edgecolor','none');<br>m_grid('tickdir','out','yaxislocation','right',...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'xaxislocation','top','xlabeldir','end','ticklen',.02);<br>hold on;<br>m_quiver(lon,lat,u,v);<br>xlabel('Simulated surface winds');<br><br>subplot(122);<br>m_coast('patch',[.9 .9 .9],'edgecolor','none');<br>m_grid('tickdir','out','yticklabels',[],...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'xticklabels',[],'linestyle','none','ticklen',.02);<br>hold on;<br>[cs,h]=m_contour(lon,lat,sqrt(u.*u+v.*v));<br>clabel(cs,h,'fontsize',8);<br>xlabel('Simulated something else');</pre><center><img src="./private/exquiv.gif"> </center>&nbsp;<h4><a name="6._Miller_Projection_with_Great_Circle"></a> <a name="e6"></a>6.Miller Projection with Great Circle</h4><pre>% Plot a circular orbit<br>lon=[-180:180];<br>lat=atan(tan(60*pi/180)*cos((lon-30)*pi/180))*180/pi;<br><br>m_proj('miller','lat',82);<br>m_coast('color',[0 .6 0]);<br>m_line(lon,lat,'linewi',3,'color','r');<br>m_grid('linestyle','none','box','fancy','tickdir','out');</pre><center><img src="./private/exmiller.gif"> </center>&nbsp;<h4><a name="7._Lambert_Conformal_Projection_with_Med"></a> 7. LambertConformalProjection with high-resolution bathymetry of Western Mediterranean</h4><pre>m_proj('lambert','lon',[-10 20],'lat',[33 48]);<br>m_tbase('contourf');<br>m_grid('linestyle','none','tickdir','out','linewidth',3);</pre><center><img src="./private/extbase.gif"> </center>&nbsp;<h4><a name="8._Demonstration_of_fancy_vectors"></a> <a name="e8"></a>8.Demonstration of fancy vectors</h4><pre>m_vec&nbsp;&nbsp; % See code in m_vec.m for details</pre><center><img src="./private/exvec.gif"> </center>&nbsp;<h4><a name="9._Zoom_in_on_Prince_Edward_Island_to_co"></a> <a name="e9"></a>9.Zoom in on Prince Edward Island to show different coastline resolutions</h4><pre>% Example showing the default coastline and all of the different resolutions&nbsp;<br>% of GSHHS coastlines as we zoom in on a section of Prince Edward Island.<br><br>clf<br>axes('position',[.35 .6 .37 .37]);<br>m_proj('albers equal-area','lat',[40 60],'long',[-90 -50],'rect','on');<br>m_coast('patch',[0 1 0]);<br>m_grid('linest','none','linewidth',2,'tickdir','out','xaxisloc','top','yaxisloc','right');<br>m_text(-69,41,'Standard coastline','color','r','fontweight','bold');<br><br>axes('position',[.09 .5 .37 .37]);<br>m_proj('albers equal-area','lat',[40 54],'long',[-80 -55],'rect','on');<br>m_gshhs_c('patch',[.2 .8 .2]);<br>m_grid('linest','none','linewidth',2,'tickdir','out','xaxisloc','top');<br>m_text(-80,52.5,'GSHHS\_C (crude)','color','m','fontweight','bold','fontsize',14);<br><br>axes('position',[.13 .2 .37 .37]);<br>m_proj('albers equal-area','lat',[43 48],'long',[-67 -59],'rect','on');<br>m_gshhs_l('patch',[.4 .6 .4]);<br>m_grid('linest','none','linewidth',2,'tickdir','out');<br>m_text(-66.5,43.5,'GSHHS\_L (low)','color','m','fontweight','bold','fontsize',14);<br><br>axes('position',[.35 .05 .37 .37]);<br>m_proj('albers equal-area','lat',[45.8 47.2],'long',[-64.5 -62],'rect','on');<br>m_gshhs_i('patch',[.5 .6 .5]);<br>m_grid('linest','none','linewidth',2,'tickdir','out','yaxisloc','right');<br>m_text(-64.4,45.9,'GSHHS\_I (intermediate)','color','m','fontweight','bold','fontsize',14);<br><br>axes('position',[.55 .23 .37 .37]);<br>m_proj('albers equal-area','lat',[46.375 46.6],'long',[-64.2 -63.7],'rect','on');<br>m_gshhs_h('patch',[.6 .6 .6]);<br>m_grid('linest','none','linewidth',2,'tickdir','out','xaxisloc','top','yaxisloc','right');<br>m_text(-64.18,46.58,'GSHHS\_H (high)','color','m','fontweight','bold','fontsize',14);</pre><center><img src="./private/exgshhs.gif"> </center>&nbsp;<h4><a name="10._Tracklines_and_UTM_projection"></a> <a name="e10"></a>10.Tracklines and UTM projection</h4><pre>m_proj('UTM','long',[-72 -68],'lat',[40 44]);<br>m_gshhs_i('color','k');<br>m_grid('box','fancy','tickdir','in');<br><br>% fake up a trackline<br>lons=[-71:.1:-67];<br>lats=60*cos((lons+115)*pi/180);<br>dates=datenum(1997,10,23,15,1:41,zeros(1,41));<br><br>m_track(lons,lats,dates,'ticks',0,'times',4,'dates',8,...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'clip','off','color','r','orient','upright');</pre><center><img src="./private/track1.gif"> </center>&nbsp;<h4><a name="11._Range_rings"></a> <a name="e11"></a>11. Range rings</h4><pre>&nbsp;&nbsp;&nbsp; m_proj('hammer','clong',170);<br>&nbsp;&nbsp;&nbsp; m_grid('xtick',[],'ytick',[],'linestyle','-');<br>&nbsp;&nbsp;&nbsp; m_coast('patch','g');<br>&nbsp;&nbsp;&nbsp; m_line(100.5,13.5,'marker','square','color','r');<br>&nbsp;&nbsp;&nbsp; m_range_ring(100.5,13.5,[1000:1000:15000],'color','b','linewi',2);<br>&nbsp;&nbsp;&nbsp; xlabel('1000km range rings from Bangkok');</pre><center><img src="./private/rring.gif"><br><br></center><h4><a name="12._Speckle"></a> <a name="e12"></a>12. Speckled boundary</h4><pre>    bndry_lon=[-128.8 -128.8 -128.3 -128 -126.8 -126.6 -128.8];    bndry_lat=[49      50.33  50.33  50   49.5   49     49];        clf;    m_proj('lambert','long',[-130 -121.5],'lat',[47 51.5],'rectbox','on');    m_gshhs_i('color','k');              % Coastline...    m_gshhs_i('speckle','color','k');    % with speckle added    m_line(bndry_lon,bndry_lat,'linewi',2,'color','k');     % Area outline ...    m_hatch(bndry_lon,bndry_lat,'single',30,5,'color','k'); % ...with hatching added.    m_grid('linewi',2,'linest','none','tickdir','out','fontsize',12);    title('Speckled Boundaries for nice B&amp;W presentation (best in postscript format)','fontsize',14);    m_text(-128,48,5,{'Pacific','Ocean'},'fontsize',18);</pre><center><img src="./private/extspeckle.gif"><br><br></center><h4><a name="13._Blueocean"></a> <a name="e13"></a>13. Blue Ocean</h4><pre>    m_proj('miller','lat',[-75 75]);<br>    <br>    set(gca,'color',[.9 .99 1]);     % Trick is to set this *before* the patch call.<br>    <br>    m_coast('patch',[.7 1 .7],'edgecolor','none');<br>    m_grid('box','fancy','linestyle','none');<br>       <br>    cities={'Cairo','Washington','Buenos Aires'};<br>    lons=[ 30+2/60  -77-2/60   -58-22/60];<br>    lats=[ 31+21/60  38+53/60  -34-45/60];<br>    <br>    for k=1:3,<br>      [range,ln,lt]=m_lldist([-123-6/60 lons(k)],[49+13/60  lats(k)],40);<br>      m_line(ln,lt,'color','r','linewi',2);<br>      m_text(ln(end),lt(end),sprintf('%s - %d km',cities{k},round(range)));<br>    end;<br>      <br>    title('Great Circle Routes','fontsize',14,'fontweight','bold');<br></pre><center><img src="./private/extblueocean.gif"><br><br></center><h2><a name="satellite_examples"></a>Examples of satellite datamanipulation</h2><h4><a name="1._Global_SST"></a>1. Global SST (or any variable on aglobalLat/Long grid)</h4><blockquote><tt>% NOAA/NASA Pathfinder AVHRR SST product</tt><br>  <tt>% http://podaac.jpl.nasa.gov/sst/</tt><br>  <br>  <tt>[P,map]=imread('../m_mapWK/199911h54ma-gdm.hdf');</tt><br>  <br>  <tt>% Documentation for the 54km dataset gives</tt><br>  <tt>% this formula for temperature</tt><br>  <tt>P=0.15*double(P)-3; % deg C</tt><br>  <br>  <tt>%...and defines this Lat/Long grid for the data</tt><br>  <tt>Plat=90-.25-[0:359]*.5;Plon=-180+.25+[0:719]*.5;</tt><br>  <br>  <tt>% Since the grid is rectangluar in lat/long (i.e. not</tt><br>  <tt>% really a projection at all, althouhg it is included in</tt><br>  <tt>% m_map under the name 'equidistant cyldindrical'), we </tt><br>  <tt>% don't want to use the 'image' technique. Instead... </tt><br>  <tt>% Create a grid, offsetting by half a grid point to account</tt><br>  <tt>% for the flat pcolor</tt><br>  <tt>[Plg,Plt]=meshgrid(Plon-0.25,Plat+0.25);</tt><br>  <br>  <tt>m_proj('hammer-aitoff','clongitude',-150);</tt><br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -