| Version 2.0.3 (R14SP1) Mapping Toolbox™ Software Release Notes | ![]() |
This table summarizes what's new in Version 2.0.3 (R14SP1):
New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
Yes Details below | Yes Details in Compatibility Considerations below. See also Summary. |
The new features and changes introduced in this version are
Four new functions have been added to Mapping 2.0.3. These are called by or can be used in conjunction with the polybool function (see polybool Revised, Has New Helper Functions.) Three of the functions check or change the ordering of vertices that define a polygon, and the fourth one splits polygons with holes in a consistent fashion.
These functions are
ispolycw — True if vertices of polygonal contour are clockwise ordered
poly2cw — Convert polygonal contour to clockwise ordering
poly2ccw — Convert polygonal contour to counterclockwise ordering
poly2fv — Convert polygonal region to face-vertex form for use with patch in order to properly render polygons containing holes
Function axesm now requires that 'MapLonLimit' values have the form [west east], but east can be less than west numerically (e.g., [120 -60]). The form [east west] is no longer supported.
Function contourm now returns a handle to a contourgroup object instead of an array of handles to line objects.
Function elevation can now return a third output, the line-of-sight azimuth corresponding to the elevation angle (output 1) and slant range (output 2). This eliminates the need to use a geodesic or rhumb line azimuth, computed with functions azimuth or distance, as an approximate substitute.
The functionality of gtopo30 has been extended so that:
Data can be read from a more general directory structure.
Empty may be supplied in place of any input argument.
Latitude and longitude limits are no longer restricted to lie within a tile. Instead, areas not covered by available data are automatically filled with NaNs.
inputm now has an optional third output argument, 'button', which functions like the third output of ginput.
Mapping 2.0.3 fixes major problems with the polybool function, which computes set operations on polygonal regions. The fixes include incompatible data structure and syntax changes.
The 'cutvector' option has been removed from the syntax. This option facilitated plotting of polygonal regions containing holes, but the cutvector computation was not robust, nor was it an effective way to represent polygonal regions containing multiply nested holes and/or discontiguous regions. To replace the cutvector functionality, a new function, poly2fv, has been added. poly2fv converts a polygonal region, possibly including holes and discontiguous regions, into a faces and a vertices matrix that can be used with the patch function to display the region. The M-file help for polybool and poly2fv contain examples illustrating how to use poly2fv.
The 'cell' and 'vector' options have been removed from the syntax. polybool now returns the output polygonal region using the same format as the input polygonal region. Use polysplit and polyjoin to convert from one format to the other.
polybool now uses the "clockwise" rule to distinguish between external polygonal contours and internal polygonal contours. This is the same rule used by ESRI shapefiles. polybool assumes that a polygonal contour whose vertices are arranged in clockwise order is an external contour, and that a polygonal contour whose vertices are arranged in counterclockwise order is an internal contour. Use ispolycw to determine whether a polygonal contour is clockwise ordered, and use poly2cw and poly2ccw to convert polygonal contours to be clockwise or counterclockwise ordered, respectively. If a polygonal region input has no external contours according to this rule, polybool issues a warning message.
An input polygonal region can either take the form of a pair of NaN-separated vectors, or it can take the form of a pair of cell arrays. In the cell array format, each cell must contain the vertices of a single polygonal contour. Representing a polygonal region as a cell array whose cells can contain NaN-separated vectors is no longer supported, and an error message will be issued.
Summary of new polybool-related helper functions. You can use the helper functions that support polybool for your own purposes. They are
ispolycw — True if vertices of polygonal contour are clockwise ordered
poly2cw — Convert polygonal contour to clockwise ordering
poly2ccw — Convert polygonal contour to counterclockwise ordering
poly2fv — Convert polygonal region to face-vertex form for use with patch
Summary of known problems addressed. The issues solved by the new implementation of polybool are
polybool no longer errors out or produces incorrect results for proper inputs.
polybool now produces consistent output when computing intersections, with results no longer depending on the order of its inputs.
polybool now operates correctly on polygons with collinear edges.
Improvements in the algorithm that polymerge uses to chain together adjacent polygon or line segments, required to address a bug and improve efficiency, in some cases also change the ordering of the output vertices.
![]() | Version 2.1 (R14SP2) Mapping Toolbox™ Software | Version 2.0.2 (R14) Mapping Toolbox™ Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |