Mapping Toolbox | ![]() ![]() |
The Digital Chart of the World/VMAP0
The most detailed, publicly available set of global vector data with consistent coverage of important map features is the Digital Chart of the World (DCW) and the revised successor to the DCW, Vector MAP level 0. Both contain vector data scanned from printed Operational Navigation Charts (ONC) and Jet Navigation Charts (JNC). The ONC charts were compiled at a scale of 1:1,000,000 and the JNC at 1:2,000,000. The publisher of the DCW was the U. S. Defense Mapping Agency, now incorporated into the U. S. National Imagery and Mapping Agency (NIMA). NIMA publishes the VMAP0.
Both contain data for the entire world in separate layers of coverage, including political and ocean features, drainage, hypsography, land cover and vegetation, populated places, roads, railroads, airports, transportation structure, and cultural landmarks. The features are formatted as patches, lines, points, or text.
The DCW was published in 1992 on four CD-ROMs. A revised version, called VMAP0, also distributed on CD-ROMs, was released in 1997. The DCW is now out of print. For more information on purchasing VMAP0 CDs, see the vmap0data
entry in the "External Data Reference" chapter of the online Mapping Toolbox reference documentation.
The Mapping Toolbox provides high-level functions that compile and extract information from the DCW and VMAP0 into Mapping Toolbox geographic data structures. There is also a graphical user interface to the VMAP0. The following sections introduce these functions and show how to work effectively with the data. Since the DCW is no longer available, the command line examples focus on VMAP0, but working with the DCW is very similar. The exception is the gazetteer feature, which was dropped in VMAP0. This data can be retrieved from The MathWorks FTP site.
Looking Up Names and Locations in the DCW Gazetteer
One of the best sources of place name information is the Digital Chart of the World Gazetteer. This is an extensive collection of place names and types within a library. The NOAMER
library, containing the data for North America, has 37,696 names in its gazette. The entire DCW gazette has more than 100,000 names. It can be used to quickly find the locations of places and can help to pick the latitude and longitude limits for other DCW functions.
The Mapping Toolbox interface to the DCW gazette is the dcwgaz
function. If the EURNASIA
CD is available and mounted on the desktop of a Macintosh computer, you can search for the geographic location of the city of Apatin in Yugoslavia by typing:
dcwgaz('EURNASIA','apatin') APATIN ans = type: 'text' otherproperty: {1x2 cell} tag: 'Built up area' string: 'APATIN' altitude: [] lat: 45.6660 long: 18.9830
On other computers, you must provide a device name as the first argument. The string you provide will depend on how the CD-ROM is mounted. For a Windows PC, the command might be:
and on a UNIX computer with the CD-ROM mounted as '/cdrom
', you should type:
See the documentation that came with your CD-ROM drive for more information on how disks are mounted.
If you do not have access to the DCW CDs, you can retrieve just the gazette data from The MathWorks FTP site. The gazette data for all four of the libraries has been collected into one directory called DCW_GAZETTE
. If you use this version of the data, your device name will need to be the full path down to and including the DCW_GAZETTE
directory.
Matches are displayed on screen during the search. The output is returned in a Mapping Toolbox geographic data structure, with the tag identifying the database layer name within the DCW. If more than one entry matches the name, the results are contained in an arrayed structure.
For example, the following command prints to the screen the 95 names in the North American library that begin with the word port and returns the structures txtstruc
and ptstruc
that can be displayed using displaym
or mlayers
.
Here is a map that shows the "ports" around the Great Lakes:
There are also databases of geographic names that you can search over the Internet. For global data, try the National Imagery and Mapping Agency GEOnet Name Server at <http://www.nima.mil/gns/html/index.html>
. For the United States, try the U. S. Geological Survey Geographic Names Information System at <http://www-nmd.usgs.gov/www/gnis/>
.
Importing VMAP0 Themes Interactively
You can easily extract data from the VMAP0 CD-ROMs with the vmap0ui
graphical user interface. Simply insert one of the CD-ROMs in your computer's CD-ROM drive, and type vmap0ui
. If vmap0ui
cannot find the CD, or finds the wrong one when several CDs are mounted, provide the device name of the drive.
The vmap0ui
panel shows the CD's coverage in yellow. The VMAP0 database breaks the world into small quadranges, called tiles. Each tile's boundary is shown in light gray. Just above the map is some text that shows how many tiles are in the area currently shown on the map. The list on the left shows the available data categories. These categories are called themes. Since this data is at a fairly high resolution, you will want to limit the kind and geographic extent of the data you extract.
Let's go through the process of extracting some data for Taiwan. We will extract the land area, popoulation centers, and roads. First zoom into Taiwan on the map. The map is always in a zoom mode, so you can zoom in by clicking or clicking and dragging. Extend-click zooms out.
Next, select the theme from the list. Themes have subcategories called features that can be accessed by double-clicking on the theme. The + indicates that a theme can be opened to reveal the sub-categories. Double-click on the Boundaries
theme, then click once to select the Political Boundary Area
feature. We will extract just the land areas as patches. Selecting the Boundaries
theme would extract all of the features.
Now you can extract the data by pressing the Get button. The progress bar shows where you are in the process, as does the map data which is added to the map display. You can interrupt the extraction by typing Ctrl-C or clicking the Cancel button. Ctrl-C stops the process more quickly. Clicking the Clear button removes any data that you have read.
You can repeat this process for the population and transportation themes. Extract all of the population area features and the transportation theme's road line feature.
The vmap0ui
applies a set of conventional map styles to extracted objects. Notice that the road lines have the appearance of roads on a map, line width indicating importance and double parallel lines for divided highways. Railroad lines are shown with cross ties, powerlines have dots along the path, and population points are large or small squares, as they are on the paper charts from which VMAP0 was derived. The vmap0ui
also automatically creates text objects for features that lack them, like built-up areas.
This is really more data than is appropriate for a map of this size. Next we'll return the data to the MATLAB workspace and create a new map that is less cluttered. Click the Save button, and then click the Workspace button . You will be shown a list of geographic data structures to which the data is written. The names are abbreviated versions of the theme and coverage names.
The geographic data structures can now be displayed on a map axes using the
command line function displaym
or the graphical user iterface mlayers
. To interactively display data from the workspace, use rootlayr
and then mlayers
. If the data was saved in a MAT-file, you can use mlayers
directly. Here most of the data has been displayed, and the built-up area text color changed to red. You may need to move the land areas down with the Zdata button to ensure that all of the lines and text are visible.
figure worldmap('taiwan','lineonly') set(handlem('allline'),'color',0.75*[ 1 1 1]) rootlayr; mlayers(ans)
Here is the result after zooming in on the island of Taiwan.
Importing VMAP0 Themes from the Command Line
The vmap0data
function is used to access the map data at the command line. The volume of data on the VMAP0 is so large that you must limit your requests to a reasonable amount. First, select the geographical area of interest by giving the name of one of the libraries in the VMAP0. There is one CD for each library: 'NOAMER
' (North America), 'EURNASIA
' (Europe and Northern Asia), 'SOAMAFR
' (South America and Africa), and 'SASAUS
' (Southern Asia and Australia).
You may also need to specify the device name of the CD, just as you did for the dcwgaz
function. The device name depends on your operating system and how it is configured. If more than one CD can be mounted at once, there will probably be a different device name for each CD. With the correct device name, you should see the following for the SASAUS
CD-ROM and library:
The geographic region of interest is further restricted by latitude and longitude limits, given in units of degrees.
You also need to specify which theme, or type of data, you want to extract. Themes are layers of data related to a kind of feature, like roads and drainage, and are given as strings. If you enter a code that is not recognized, a list of valid codes and their descriptions are displayed.
Finally, you need to indicate what type of graphic objects you want (patches, lines, points, or text). These are called topology levels.
You can see the list of available themes by entering an incorrect one, like '?
'. The latitude and longitude limits correspond to the Cape Cod region:
Struc = vmap0data(devicename,'NOAMER',... [41 44],[-72 -69],'?','line') ??? Error using ==> vmap0data Theme not present in library NOAMER Valid theme identifiers are: libref : Library Reference tileref: Tile Reference bnd : Boundaries dq : Data Quality elev : Elevation hydro : Hydrography ind : Industry phys : Physiography pop : Population trans : Transportation util : Utilities veg : Vegetation
If you are using a Windows PC, with the 'NOAMER
' CD-ROM in the 'F:
' drive, you can read the Political/Ocean line features for the same Cape Cod region by entering the following:
BNDline = vmap0data('F:','NOAMER',... [41 44],[-72 -69],'bnd','line') BNDline = 1x8 struct array with fields: type otherproperty altitude lat long tag
The result is a Mapping Toolbox geographic data structure. Look at the geographic limits by concatenating the data with extractm
.
Notice that this region is larger than was requested. VMAP0 tiles the world into quadrangles of various sizes. When a tile overlaps the requested region, vmap0data
extracts the data for the entire tile. Similarly, if you request a point location, the entire quadrangle is returned. All objects are cut at the edges of the tiles. Also note that the tiling itself may change from one edition of VMAP0 to the next. For example, the boundaries for the tile containing Cap Cod (the extraction described above) changed between editions 4 and 5.
The kind of information in an element of the structure is described by the tag
field. There are eight kinds of boundary lines in this region:
unique(strvcat(BNDline.tag),'rows') ans = Accurate; Definite; Coastline/Shoreline Accurate; Definite; International; Administrative Boundary Accurate; Definite; Primary/1st Order; Administrative Boundary Approximate; Definite; International; Administrative Boundary Depth Contour; 1000 Depth Contour; 200 Depth Contour; 2000 Depth Contour; 600
You can extract more than one topology level using a cell array of level names. Extracting patches and points is more time-consuming, so this will take longer than the previous example. The following example assumes that the 'NOAMER
' CD-ROM is mounted on a UNIX computer as '/cdrom
':
[BNDpatch,BNDpoint,BNDtext] = vmap0data('/cdrom','NOAMER',... [41 44],[-72 -69],'bnd',{'patch' 'point' 'text'}); BNDpatch(1) ans = type: 'patch' otherproperty: {} altitude: [] lat: [44x1 double] long: [44x1 double] tag: 'BAY OF FUNDY; Water (except Inland)' BNDpatch(end).tag ans = North America; United States; VERMONT; Administrative Area
The following commands plot the political and ocean features on a Mercator projection, hiding the ocean patches. They also override the default colormap used for the land patches and remove the edge color to hide any tile joints:
worldmap([41 44], [-72 -69],'none') setm(gca,'MapProjection','mercator'); tightmap hBNDpatch = displaym(BNDpatch); hBNDline = displaym(BNDline); hBNDpoint = displaym(BNDpoint); hBNDtext = displaym(BNDtext); set(hBNDpatch,'EdgeColor','None') hidem(handlem('NORTH ATLANTIC OCEAN; Water (except Inland)')); colormap(polcmap) zdatam('allpatch',-1)
Notice how much more detailed this map is than even the best of the atlas data provided in the Mapping Toolbox. The highest resolution atlas data is in the usahi
workspace, which is limited to the United States. VMAP0 covers the entire world at this level of detail. Unlike the earlier DCW, islands are not tagged with a state name.
The VMAP0 does not contain all topology levels in each theme. Roads, for example, have no patches. If data is requested for topology levels that are not available, the function issues a warning and returns an empty matrix. Here is a display of the road and railroad line data for the Cape Cod map.
[TRpatch,TRline,TRpoint,TRtext] = vmap0data('cdrom','NOAMER',... [41 44],[-72 -69],trans',{'all'}); clma hBNDline = displaym(BNDline); set(hBNDline,'Color',[1 1 1]*0.75,'LineWidth',1) hTRline = displaym(TRline);
You can use the handlem
graphical user interface to select only the roads or railroads. This would let you change, for example, all of the railroad lines to a dashed style.
The network of roads around Boston gives away its location. VMAP0 also includes a populated places theme, containing the boundaries of built-up areas. Extract the 'pop
' theme, reduce the displayed area to Boston and Cape Cod, and plot the populated places:
PPpatch = vmap0data('NOAMER',[41 44],[-72 -69],'pop','patch'); PPpatch = vmap0data('/cdrom','NOAMER',[41 44],[-72 -69],... 'pop','patch'); setm(gca,'MapLatLimit',[41.13 42.75],... 'MapLonLimit',[-71.7 -69.8]) tightmap hPPpatch = displaym(PPpatch); set(hPPpatch,'FaceColor','y','Edgecolor','None') zdatam(hPPpatch,-1)
The names of many of the cities are stored in the tag field of populated place patches and points. Unlike the DCW, VMAP0 does not provide text objects with city names, but they can be extracted from the tags.
Create a new geographic data structure of named cities using the geographic mean of the populated place outlines.
k = 0; for i=1:length(PPpatch) str = PPpatch(i).tag; if isempty(strmatch('No entry present;',str)) k=k+1; lat = PPpatch(i).lat; lon = PPpatch(i).long; [lat,lon] = meanm(lat(~isnan(lat)), lon(~isnan(lon)) ); indx = findstr(';',str); PPtext(k).string = str(1:indx(1)-1); PPtext(k).type = 'text'; PPtext(k).tag = 'Place Name'; PPtext(k).otherproperty = []; PPtext(k).lat = lat; PPtext(k).long = lon; PPtext(k).altitude = []; end end hPPtext = displaym(PPtext); set(hPPtext,'FontSize',6) set(handlem('allline'),'Color',[.5 .5 .5])
There is more data describing man-made features, including airports, utilities and cultural landmarks. The DCW also contains data for the natural world. The drainage and elevation contours are usually the most extensive data themes.
clma [DNpatch,DNline,DNtext] = vmap0data(devicename,'NOAMER',... [41 44],[-72 -69],'hydro',{'patch','line','text'}); ELline = vmap0data(devicename,'NOAMER',... [41 44],[-72 -69],'elev','line'); hBNDline = displaym(BNDline); hDNline = displaym(DNline); hDNpatch = displaym(DNpatch); hELline = displaym(ELline); set(hBNDline,'Color',[1 1 1]*0.75) set(hDNline,'Color','c'); set(hDNpatch,'FaceColor','c','EdgeColor','none')
Reading VMAP0 Files Directly
The high-level vmap0data
function is the most convenient way to read data from the VMAP0 because it integrates information from many different files in different directories. Individual VMAP0 files are less useful because few of them contain complete information. Most people have little need to read the raw VMAP0 data files. Still, the Mapping Toolbox can read most VMAP0 files into MATLAB structures using the vmap0read
function. The "External Data Reference" chapter of the online Mapping Toolbox reference documentation has more information on directly accessing individual VMAP0 files.
More information on the relationships between the files and the meaning of the data in the files can be found in the U. S. Government Military Specifications and Standards.
![]() | External Data Interface | Global Self-Consistent Hierarchical High-Resolution Shoreline | ![]() |