Mapping Toolbox | ![]() ![]() |
Political
The Mapping Toolbox includes a set of matrix data coded with political information in the MAT-file worldmtxmed
.
load worldmtx whos
|
|
|
|
|
|
|
|
cmap |
207x3 |
4968 |
|
map |
720x1440 |
1036800 |
|
maplegend |
1x3 |
24 |
|
names |
1x207 |
23140 |
|
The variable map
is a regular matrix map containing indices of political entities. The names
cell array relates the indices in the map to the names of countries, and the variable cmap
is a colormap that provides a good political display of the world.
Display the political regular matrix map using the meshm
function and the provided colormap:
The map is shown in a Gall Orthographic projection, more recently made familiar as the Peters projection. This projection is equal-area, a property that is often desirable in representing competing political units.
The resolution of this data makes it suitable for global displays. Larger scale, regional maps are better made with vector data such as that in the worldlo
or worldhi
databases. More detailed political matrix maps can be created from vector data using vec2mtx
, country2mtx,
or the techniques described in GUI Tools, of this document.
The primary use of this dataset is to determine which country contains a point known by its latitude and longitude. What country claims sovereignty over the point at 5° E and 13° N?
Work through this example to see how the result was obtained. The matrix map
contains integer country codes. By calling the function ltln2val
, we extracted the country code of the geographic point. The country code is an index into the names
cell array, which returns the name of the country.
You can create your own matrix maps at higher resolutions. If the worldlo atlas data is good enough, use country2mtx
. If you have higher resolution data, use vec2mtx
. Here is a matrix map of Cameroon and Nigeria at a resolution of 10 cells per degree, or about 10 kilometers.
latlim = [0 15]; lonlim = [0 20]; [cmap,cmaplegend] = country2mtx('cameroon',10,latlim,lonlim); [nmap,nmaplegend] = country2mtx('nigeria',10,latlim,lonlim); newmap = zeros(size(cmap)); newmaplegend = cmaplegend; newmap(cmap==0) = 34; % find cells in the interior newmap(nmap==0) = 130; % use codes from nations structure worldmap(latlim,lonlim) meshm(newmap,newmaplegend,size(newmap)) polcmap
![]() | High-Resolution World Atlas Data | Terrain | ![]() |