First, get all the files, either as a zip archive or a gzipped tar-file and unpack them. Now, start up Matlab (version 5 or higher). Make sure that the toolbox is in your path. This can be done simply by cd'ing to the correct directory. Alternatively, if you have unpacked them into directory /users/rich/m_map (and /users/rich/m_map/private), then you can add this to your search path: (Note: you may want to install M_Map as a toolbox accessible to all users. To do this, unpack the files into $MATLAB/toolbox/m_map, and add that directory to the list defined in $MATLAB/toolbox/local/pathdef.m). The first line initializes the projection. Defaults are set for the different projection, so you can easily see what a specific projection looks like, but all projections have a number of optional parameters as well. To get the same map without using the defaults, you would use The second line draws a coastline, using the 1/4 degree database. Coastlines with greater resolution can be drawn, using your own database (see also Section 7 ). m_coast can be called with various line parameters. For example, The third line superimposes a grid. Although there are many possible options that can be used to customize the appearance of the grid, defaults can always be used (as in the example). These options are discussed in Section 4 . You can get a list of the options using the GET syntax: m_ll2xy (and its inverse m_xy2ll) convert from longitude/latitude coordinates to those of the projection. Various clipping options can also be specified in converting to projection coordinates. Finally, we may want to alter the grid details slightly. Note that, a given map must only be initialized once. These maps are usually drawn with rectangular boundaries (with the exception of the sinusoidal and sometimes the transverse mercator). M_Map includes two fairly simple databases for coastlines and global elevation data. Highly-detailed databases are not included in this release because they are a) extremely large and b) extremely time-consuming to process (loops are inherently involved). If more detailed maps are required, section 7 and section 8 give instructions on how to proceed. M_Map includes a 1/4 degree resolution coastline database. This is suitable for maps covering large portions of the globe, but is noticeably coarse for many large-scale applications. Users not satisfied with their regional map are directed to section 7 for more information on creating and using high-resolution coastlines. The M_Map database is accessed using the m_coast function. Coastlines can be drawn as simple lines, using Note that line coastlines are usually drawn rather rapidly. Filled coastlines take considerably more time to generate (because map limits are not necessarily rectangular, clipping must be accomplished in m-files. M_Map can access a 1-degree resolution global elevation database (actually, this database is is included in the Matlab distribution, used by of $MATLAB/toolbox/matlab/demos/earthmap.m). A contour map of elevations at default levels can be drawn using The purpose of this package is to allow you to map your own data! Once a suitable grid and (possibly) a coastline have been chosen, raw longitude/latitude coordinates must be converted to projection coordinates before being plotted. Similarly, an program using, say, ginput to select points will have to convert projection coordinates back to longitude/latitude. Once the conversion of coordinates has taken place, plotting of data using any of the standard Matlab functions (line, patch, pcolor, etc.) proceeds as usual. Caution: One problem that sometimes occurs is that data does not appear on the plot due to ambiguities in longitude values. For example, if plot longitude limits are [-180 180], a point with a longitude of, say, 200, may not appear in cylindrical and conic projections. This is not a bug. Handling the clipping in 'wrapped around' curves requires adding points (rather than just moving them) and is therefore incompatible with various other requirements (such as keeping input and output matrices the same size in the conversion routines described below). For ideas on how to make more complex plots, see the Examples. These plots are also included in the function m_demo. If you are interested in a particular area and want a higher-resolution coastline than that used by m_coast, the best procedure is to A number of global and regional topography databases are available at NCAR . Several are available for free from their ftp site. As long as the data is stored in a mat-file as a rectangular matrix in longitude/latitude, modification of m_elev to make use this data should be straightforward. Source.

Яндекс.Метрика Рейтинг Free Web Counter
page counter
Last Modified: April 22, 2016 @ 1:05 pm