ebook img

Matlab Mapping Toolbox documentation PDF

2720 Pages·2016·24.184 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Matlab Mapping Toolbox documentation

Mapping Toolbox™ User's Guide R2016a How to Contact MathWorks Latest news: www.mathworks.com Sales and services: www.mathworks.com/sales_and_services User community: www.mathworks.com/matlabcentral Technical support: www.mathworks.com/support/contact_us Phone: 508-647-7000 The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 Mapping Toolbox™ User's Guide © COPYRIGHT 1997–2016 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc. Trademarks MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders. Patents MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information. Revision History May 1997 First printing New for Version 1.0 October 1998 Second printing Version 1.1 November 2000 Third printing Version 1.2 (Release 12) July 2002 Online only Revised for Version 1.3 (Release 13) September 2003 Online only Revised for Version 1.3.1 (Release 13SP1) January 2004 Online only Revised for Version 2.0 (Release 13SP1+) April 2004 Online only Revised for Version 2.0.1 (Release 13SP1+) June 2004 Fourth printing Revised for Version 2.0.2 (Release 14) October 2004 Online only Revised for Version 2.0.3 (Release 14SP1) March 2005 Fifth printing Revised for Version 2.1 (Release 14SP2) August 2005 Sixth printing Minor revision for Version 2.1 September 2005 Online only Revised for Version 2.2 (Release 14SP3) March 2006 Online only Revised for Version 2.3 (Release 2006a) September 2006 Seventh printing Revised for Version 2.4 (Release 2006b) March 2007 Online only Revised for Version 2.5 (Release 2007a) September 2007 Eighth printing Revised for Version 2.6 (Release 2007b) March 2008 Online only Revised for Version 2.7 (Release 2008a) October 2008 Online only Revised for Version 2.7.1 (Release 2008b) March 2009 Online only Revised for Version 2.7.2 (Release 2009a) September 2009 Online only Revised for Version 3.0 (Release 2009b) March 2010 Online only Revised for Version 3.1 (Release 2010a) September 2010 Online only Revised for Version 3.2 (Release 2010b) April 2011 Online only Revised for Version 3.3 (Release 2011a) September 2011 Online only Revised for Version 3.4 (Release 2011b) March 2012 Online only Revised for Version 3.5 (Release 2012a) September 2012 Online only Revised for Version 3.6 (Release 2012b) March 2013 Online only Revised for Version 3.7 (Release 2013a) September 2013 Online only Revised for Version 4.0 (Release 2013b) March 2014 Online only Revised for Version 4.0.1 (Release 2014a) October 2014 Online only Revised for Version 4.0.2 (Release 2014b) March 2015 Online only Revised for Version 4.1 (Release 2015a) September 2015 Online only Revised for Version 4.2 (Release 2015b) March 2016 Online only Revised for Version 4.3 (Release 2016a) Contents Getting Started 1 Mapping Toolbox Product Description . . . . . . . . . . . . . . . . . . 1-2 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Create Your First World Map . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Tour Boston with the Map Viewer App . . . . . . . . . . . . . . . . 1-11 Open the Map Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 Getting More Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31 Ways to Get Mapping Toolbox Help . . . . . . . . . . . . . . . . . . 1-31 Understanding Map Data 2 What Is a Map? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 What Is Geospatial Data? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Vector Geodata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Inspect an Example of Vector Map Data . . . . . . . . . . . . . . . . 2-6 Raster Geodata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Digital Elevation Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Remotely Sensed Image Data . . . . . . . . . . . . . . . . . . . . . . . 2-10 v Generate Shaded Relief Map using Raster Data . . . . . . . . . 2-12 Combining Vector and Raster Geodata . . . . . . . . . . . . . . . . 2-15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 Points, Lines, and Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 Displaying a Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 Displaying a Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Displaying a Polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19 Segments Versus Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23 Mapping Toolbox Geographic Data Structures . . . . . . . . . . 2-25 Shapefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25 The Contents of Geographic Data Structures . . . . . . . . . . . 2-25 Examining a Geographic Data Structure . . . . . . . . . . . . . . . 2-27 How to Construct Geographic Data Structures . . . . . . . . . . 2-28 Mapping Toolbox Version 1 Display Structures . . . . . . . . . . 2-34 Selecting Data to Read with the shaperead Function . . . . . 2-35 Example 1: Predicate Function in Separate File . . . . . . . . . 2-35 Example 2: Predicate as Function Handle . . . . . . . . . . . . . . 2-36 Example 3: Predicate as Anonymous Function . . . . . . . . . . 2-37 Example 4: Predicate (Anonymous Function) Defined Within Cell Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38 Example 5: Parameterizing the Selector; Predicate as Nested Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38 Georeferenced Raster Data . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40 Referencing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40 Referencing Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40 Referencing Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41 Regular Data Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42 Constructing a Global Data Grid . . . . . . . . . . . . . . . . . . . . . . 2-43 Computing Map Limits for Regular Data Grids . . . . . . . . . . 2-45 Geographic Interpretation of Grid Cells . . . . . . . . . . . . . . . 2-47 Precomputing the Size of a Data Grid . . . . . . . . . . . . . . . . . 2-49 vi Contents Geolocated Data Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 Define Geolocated Grid Format . . . . . . . . . . . . . . . . . . . . . . . 2-51 Geographic Interpretations of Geolocated Grids . . . . . . . . 2-54 Type 1: Values associated with the upper left grid coordinate 2-54 Type 2: Values centered within four adjacent coordinates . . 2-55 Ordering of Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-57 Transforming Regular to Geolocated Grids . . . . . . . . . . . . . 2-57 Transforming Geolocated to Regular Grids . . . . . . . . . . . . . 2-58 Finding Geospatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-59 Finding Vector Geodata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-60 Finding Raster Geodata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62 Raster Geospatial Data Files . . . . . . . . . . . . . . . . . . . . . . . 2-62 Web Map Service Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 Additional Data Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-65 Functions that Read and Write Geospatial Data . . . . . . . . . 2-66 Exporting Vector Geodata . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-70 Exporting KML Files for Viewing in Earth Browsers . . . . . 2-71 Generate a Single Placemark Using kmlwritepoint . . . . . . . 2-71 Generate Placemarks from Addresses . . . . . . . . . . . . . . . . . 2-72 Export Point Geostructs to Placemarks . . . . . . . . . . . . . . . . 2-73 Functions That Read and Write Files in Compressed Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-77 Understanding Geospatial Geometry 3 Understanding Spherical Coordinates . . . . . . . . . . . . . . . . . . 3-2 Spheres, Spheroids, and Geoids . . . . . . . . . . . . . . . . . . . . . . 3-2 Geoid and Ellipsoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Reference Spheroids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 vii Understanding Latitude and Longitude . . . . . . . . . . . . . . . . 3-16 Understanding Angles, Directions, and Distances . . . . . . . . 3-18 Positions, Azimuths, Headings, Distances, Length, and Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18 Working with Length and Distance Units . . . . . . . . . . . . . . 3-19 Compute Conversion Ratio Between Units of Length . . . . . . 3-20 Working with Angles: Units and Representations . . . . . . . . 3-21 Angles as Binary and Formatted Numbers . . . . . . . . . . . . . 3-25 Convert from Linear Measurements to Spherical Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Working with Distances on the Sphere . . . . . . . . . . . . . . . . 3-28 Arc Length as an Angle in the distance and reckon Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29 Summary: Available Distance and Angle Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30 Understanding Map Projections . . . . . . . . . . . . . . . . . . . . . . 3-31 What Is a Map Projection? . . . . . . . . . . . . . . . . . . . . . . . . . 3-31 Forward and Inverse Projection . . . . . . . . . . . . . . . . . . . . . 3-31 Projection Distortions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32 Great Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33 Rhumb Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34 Small Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35 Computing Small Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35 Directions and Areas on the Sphere and Spheroid . . . . . . . 3-39 About Azimuths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39 Reckoning — The Forward Problem . . . . . . . . . . . . . . . . . . 3-39 Distance, Azimuth, and Back-Azimuth (the Inverse Problem) 3-42 Measuring Area of Spherical Quadrangles . . . . . . . . . . . . . 3-44 viii Contents Creating and Viewing Maps 4 Introduction to Mapping Graphics . . . . . . . . . . . . . . . . . . . . . 4-3 Continent, Country, Region, and State Maps Made Easy . . . 4-4 Set Background Colors for Map Displays . . . . . . . . . . . . . . . . 4-5 Create Simple Maps Using worldmap . . . . . . . . . . . . . . . . . . . 4-6 Create Simple Maps Using usamap . . . . . . . . . . . . . . . . . . . . . 4-9 What Is a Map Axes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Using axesm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Accessing and Manipulating Map Axes Properties . . . . . . . 4-16 Understanding the Map Limit Properties . . . . . . . . . . . . . . 4-21 Specify Map Projection Origin and Frame Limits Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23 Create Cylindrical Projection Using Map Limit Properties . . 4-27 Create Conic Projection Using Map Limit Properties . . . . . . 4-29 Create Southern Hemisphere Conic Projection . . . . . . . . . . 4-30 Create North-Polar Azimuthal Projection . . . . . . . . . . . . . . 4-32 Create South-Polar Azimuthal Projection . . . . . . . . . . . . . . 4-34 Create Equatorial Azimuthal Projection . . . . . . . . . . . . . . . 4-35 Create General Azimuthal Projection . . . . . . . . . . . . . . . . . 4-36 Create Long Narrow Oblique Mercator Projection . . . . . . . . 4-38 Switching Between Projections . . . . . . . . . . . . . . . . . . . . . . . 4-40 Change Projection Updating Meridian and Parallel Labels . 4-40 Change Projection Resetting Frame Limits . . . . . . . . . . . . . 4-43 Projected and Unprojected Graphic Objects . . . . . . . . . . . . 4-47 Auto-Reprojection of Mapped Objects and Its Limitations . 4-48 Changing Map Projections when Using geoshow . . . . . . . . 4-51 Change Map Projection with Vector Data Using geoshow . 4-52 ix Change Map Projection with Raster Data Using geoshow . 4-55 Use Geographic and Nongeographic Objects in Map Axes . 4-57 The Map Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-61 Plot Regions of Robinson Frame and Grid Using Map Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-63 Map and Frame Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-68 The Map Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-69 Grid Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-70 Grid Layering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-71 Limiting Grid Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-72 Labeling Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74 Programming and Scripting Map Construction . . . . . . . . . 4-75 Display Vector Data as Points and Lines . . . . . . . . . . . . . . . 4-76 Summary of Polygon Mapping Functions . . . . . . . . . . . . . . 4-80 Reprojectability of Maps with Vector Data . . . . . . . . . . . . . 4-80 Display Vector Maps as Lines or Patches . . . . . . . . . . . . . . . 4-82 Types of Data Grids and Raster Display Functions . . . . . . . 4-90 Fitting Gridded Data to the Graticule . . . . . . . . . . . . . . . . . 4-92 Fit Gridded Data to Graticule . . . . . . . . . . . . . . . . . . . . . . . 4-92 Create 3-D Displays with Raster Data . . . . . . . . . . . . . . . . . 4-97 Picking Locations Interactively . . . . . . . . . . . . . . . . . . . . . . 4-101 Defining Small Circles and Tracks Interactively . . . . . . . . 4-103 Interactive Text Annotation . . . . . . . . . . . . . . . . . . . . . . . 4-105 x Contents

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.