Mapping Toolbox | ![]() ![]() |
Constructing Personalized Map Data with GUIs
Trimming an Existing Data Set
You can use the maptrim
tool to trim a map dataset. For example, you want to work with just a portion of the coastline data found in the coast
workspace, say the region around Japan. Use the maptrim
tool to trim the coastline data to this region, then save the trimmed dataset as a new vector or matrix map.
A new figure window displays the unprojected coastline data. Drag the zoom box to the region around Japan.
Double-click in the box to zoom in. Repeat this process until the area of interest fills the figure window.
Select CustomizeLimits to specify the exact limits of the region of interest. A dialog box appears with the latitude and longitude limits of the current display. Set the latitude limits to [24 48] and the longitude limits to [123 149]. Press OK.
To save this trimmed region as vector data, choose CustomizeSave As
Line or Customize
Save As
Patch from the menu bar. A dialog box will appear prompting you to enter variable names for your new dataset.
The maptrim
tool can also be used to convert data from vector format to matrix format. The command line equivalent function is rec2mtx
. To convert the trimmed region around Japan, choose CustomizeSave As
Regular Surface from the menu bar. Save the trimmed map data under the variable name
map
, and the map legend under variable name maplegend
. Enter a scale of 5 cells per degree. Press OK.
You now have a regular matrix map of Japan in your workspace. The Customize Map figure window can now be closed.
![]() | Example Two: Creating a Regional Map | Encoding a Regular Surface Map | ![]() |