MATLAB Mapping Toolbox User s Guide The Mathworks All Chapters Instant Download
MATLAB Mapping Toolbox User s Guide The Mathworks All Chapters Instant Download
com
https://textbookfull.com/product/matlab-mapping-toolbox-
user-s-guide-the-mathworks/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/matlab-econometrics-toolbox-user-s-
guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-bioinformatics-toolbox-user-s-
guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-optimization-toolbox-user-s-
guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-trading-toolbox-user-s-guide-
the-mathworks/
textboxfull.com
MATLAB Computer Vision Toolbox User s Guide The Mathworks
https://textbookfull.com/product/matlab-computer-vision-toolbox-user-
s-guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-curve-fitting-toolbox-user-s-
guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-s-
guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-global-optimization-toolbox-
user-s-guide-the-mathworks/
textboxfull.com
https://textbookfull.com/product/matlab-image-processing-toolbox-user-
s-guide-the-mathworks/
textboxfull.com
Mapping Toolbox™
User's Guide
R2020a
How to Contact MathWorks
Phone: 508-647-7000
Getting Started
1
Mapping Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
v
Geographic Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
Shapefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
The Contents of Geographic Data Structures . . . . . . . . . . . . . . . . . . . . . 2-24
Examining a Geographic Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
How to Construct Geographic Data Structures . . . . . . . . . . . . . . . . . . . . 2-27
Mapping Toolbox Version 1 Display Structures . . . . . . . . . . . . . . . . . . . . 2-31
vi Contents
Select Shapefile Data to Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-101
Example 1: Predicate Function in Separate File . . . . . . . . . . . . . . . . . . 2-101
Example 2: Predicate as Function Handle . . . . . . . . . . . . . . . . . . . . . . . 2-102
Example 3: Predicate as Anonymous Function . . . . . . . . . . . . . . . . . . . 2-102
Example 4: Predicate (Anonymous Function) Defined Within Cell Array 2-103
Example 5: Parametrizing the Selector; Predicate as Nested Function . 2-103
vii
Convert from Linear Measurements to Spherical Measurements . . . . . . 3-23
Azimuth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Calculate Azimuth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Elevation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Generate Vector Data for Points Along Great Circle or Rhumb Line Tracks
......................................................... 3-32
Reckoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
viii Contents
Continent, Country, Region, and State Maps Made Easy . . . . . . . . . . . . . . 4-3
Plot Regions of Robinson Frame and Grid Using Map Limits . . . . . . . . . 4-77
ix
Summary of Polygon Display Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-86
x Contents
Drape Data on Elevation Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Combine Elevation Maps with Other Kinds of Data . . . . . . . . . . . . . . . . . 5-29
Drape Data over Terrain with Different Gridding . . . . . . . . . . . . . . . . . . . 5-29
Drape Geolocated Grid on Regular Data Grid via Texture Mapping . . . . 5-41
xi
Colormaps for Political Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
Explore Colormaps for Political Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
Labeling Colorbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-32
Editing Colorbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
xii Contents
Rasterize Polygons Interactively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-43
Compute Gradient, Slope, and Aspect from Regular Data Grid . . . . . . . . 7-51
xiii
Work in UTM Without a Displayed Map . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-48
xiv Contents
Drape WMS Imagery onto Elevation Data . . . . . . . . . . . . . . . . . . . . . . . . 9-46
Add Line, Polygon, and Marker Overlay Layers to Web Maps . . . . . . . . . 9-76
xv
Troubleshoot Common Problems with Web Maps . . . . . . . . . . . . . . . . . . 9-112
Why Does My Web Map Contain Empty Tiles? . . . . . . . . . . . . . . . . . . . . 9-112
Why Does My Web Map Lose Detail When I Zoom In? . . . . . . . . . . . . . . 9-112
Mapping Applications
10
Geographic Statistics for Point Locations on a Sphere . . . . . . . . . . . . . . 10-2
Geographic Means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Geographic Standard Deviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
What Is Navigation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
Conventions for Navigational Functions . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
xvi Contents
1
Getting Started
This chapter provides step-by-step examples of basic Mapping Toolbox capabilities and guides you
toward examples and documentation that can help answer your questions. For an alphabetical list of
functions click on MATLAB Functions link at bottom of mainMapping Toolbox page.
Mapping Toolbox provides algorithms, functions, and an app for analyzing geographic data and
creating map displays in MATLAB®. You can import vector and raster data from a wide range of file
formats and web map servers. The toolbox lets you subset and customize data using trimming,
interpolation, resampling, coordinate transformations, and other techniques. Geospatial data can be
combined with base map layers from multiple sources in a single map display. You can export data in
file formats such as shapefile, GeoTIFF, and KML. By incorporating mapping functions into MATLAB
programs, you can automate frequent tasks in your geospatial workflow.
Key Features
• Vector and raster data import and export
• Custom raster map retrieval from Web Map Services (WMS) servers
• Web map display with dynamic base maps from OpenStreetMap and other sources
• 2D and 3D map display, customization, and interaction
• Digital terrain and elevation model analysis functions
• Geometric geodesy functions, including 2D and 3D coordinate transformations and more than 65
map projections
1-2
Acknowledgments
Acknowledgments
This software was originally developed and maintained through Version 1.3 by Systems Planning and
Analysis, Inc. (SPA), of Alexandria, Virginia.
Except where noted, the information contained in example and sample data files (found in
toolbox/map/mapdata) is derived from publicly available digital data sets. These data files are
provided as a convenience to Mapping Toolbox users. MathWorks makes no claims that any of this
data is free of defects or errors, or that the representations of geographic features or names are up to
date or authoritative.
1-3
1 Getting Started
Create an empty map axes, ready to hold the data of your choice. The function worldmap
automatically selects a reasonable choice for your map projection and coordinate limits. To display a
world map, the function chose a Robinson projection centered on the prime meridian and the equator
(0° latitude, 0° longitude).
worldmap world
Import low-resolution world coastline data. The coastline data is a set of discrete vertices that, when
connected in the order given, approximate the coastlines of continents, major islands, and inland
seas. The vertex latitudes and longitudes are stored as vectors in a MAT-file. Load the MAT-file and
view the variables in the workspace.
load coastlines
whos
1-4
Create Your First World Map
Determine how many separate elements are in the coastline data vectors. Even though there is only
one vector of latitudes, coastlat, and one vector of longitudes, coastlon, each of these vectors
contain many distinct polygons, forming the worlds coastlines. These vectors use NaN separators and
NaN terminators to divide each vector into multiple parts.
ans = 241
Plot the coastline data on the map axes using the plotm function. plotm is the geographic equivalent
of the MATLAB plot function. It accepts coordinates in latitude and longitude, transforms them to x
and y via a specified map projection, and displays them in a figure axes. In this example, worldmap
uses the Robinson projection.
plotm(coastlat, coastlon)
Create a new map axes for plotting data over Europe. This time, specify a return argument for the
worldmap function to get a handle to the figure's axes. The axes object on which map data is
displayed is called a map axes. In addition to the graphics properties common to any MATLAB axes
object, a map axes object contains additional properties covering map projection type, projection
parameters, map limits, etc. The getm and setm functions and others allow you to access and modify
these properties.
1-5
1 Getting Started
h = worldmap('Europe');
getm(h,'MapProjection')
ans =
'eqdconic'
Add data to the map of Europe by using the geoshow function to import and display several
shapefiles in the toolbox/map/mapdata folder. Note how the geoshow function can plot data
directly from files onto a map axes without first importing it into the workspace. To change the color
of the marker, use the MarkerEdgeColor property and, for some markers, the MarkerFaceColor
property.
1-6
Create Your First World Map
labelLat = 35;
labelLon = 14;
textm(labelLat, labelLon, 'Mediterranean Sea')
1-7
1 Getting Started
1-8
Tour Boston with the Map Viewer App
• Assemble layers of vector and raster geodata and render them in 2-D
• Import, reorder, symbolize, hide, and delete data layers
• Identify coordinate locations
• List data attributes
• Display selected data attributes as data tips (signposts that identify attribute values, such as place
names or route numbers)
section, click Map Viewer . You can also start the Map Viewer using the mapview
command. The Map Viewer opens with a blank canvas. (No data is present.)
Note that The Map Viewer is designed primarily for working with data sets that refer to a
projected map coordinate system (as opposed to a geographic, latitude-longitude system), so the
coordinate axes are named X and Y.
2 Import map data. In the Map Viewer, select the File menu and then choose Import From File.
Navigate to the matlabroot\toolbox\map\mapdata folder, where matlabroot represents
your MATLAB installation folder, and open the GeoTIFF file boston.tif.
1-9
1 Getting Started
The file opens in the Map Viewer. The image is a visible red, green, and blue composite from a
georeferenced IKONOS-2 panchromatic/multispectral product created by GeoEye. Copyright ©
GeoEye, all rights reserved. For further information about the image, refer to the text files
boston.txt and boston_metadata.txt. To open boston.txt, type the following at the
command line:
open 'boston.txt'
3 Set the map scale in the Map Viewer. To do this, you must first set the map distance units. Click
the Map units menu at the bottom center and select US Survey Feet.
4 Set the map scale. Type 1:25000 in the Scale box, which is above the Map units menu, and
press Enter. The Map Viewer now looks like this.
1-10
Tour Boston with the Map Viewer App
5 Get the map coordinates for a location on the map, interactively. Place the cursor over a location
on the map. The example puts the cursor over the bridge that goes over the pond in Boston
Garden. The map coordinates for this location are shown at the lower left as 772,423.18 feet
easting (X), 2,954,372.40 feet northing (Y), in Massachusetts State Plane coordinates.
6 Import a vector data layer. For this example, import a line shapefile that contains data about the
streets and highways in the central Boston area.
boston_roads = shaperead('boston_roads.shp');
1-11
1 Getting Started
The unitsratio function computes conversion factors between a variety of units of length.
8 In the Map Viewer File menu, select Import From Workspace > Vector Data > Geographic
Data Structure.
In the Import Vector Data dialog box, select the variable boston_roads as the data to import
from the workspace, and click OK.
1-12
Tour Boston with the Map Viewer App
You could clear the workspace now if you wanted, because all the data that the Map Viewer
needs is now loaded into it.
9 After the Map Viewer finishes importing the roads layer, it selects a random color and renders all
the shapes with that color as solid lines. The view looks like this.
Being random, the color you see for the road layer may differ.
10 Explore the attributes of the vector layer. First, make the vector layer the active layer using the
Active layer menu at the bottom right. Select boston_roads. You can designate any layer to be
the active layer; it does not need to be the topmost layer. By default, the first layer imported is
active. Changing the active layer has no visual effect on the map. Doing so allows you to query
attributes of the layer you select. For example, once you make the vector layer the active layer,
1-13
Another Random Scribd Document
with Unrelated Content
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com