Mapping Toolbox | ![]() ![]() |
Inserts points along the dateline to the pole.
Syntax
Description
[lat2,lon2] = flatearthpoly(lat,lon) inserts points in the input latitude and longitude vectors at +/- 180 longitude and to the poles. The resulting vectors look like the result of patchm
on a cylindrical projection and do not encompass the poles. Inputs and outputs are in degrees.
[lat2,lon2] = flatearthpoly(lat,lon,origin) centers the polygon on the provided origin. The origin is a scalar longitude or a three element vector containing latitude, longitude and orientation in units of degrees.
Example
Vector data for geographic objects that encompass a pole will inevitably encounter or cross the dateline. While the Mapping Toolbox properly displays such polygons, they can cause problems for commands like the polygon intersection and boolean operations that work with cartesian coordinates. When these polygons are treated as cartesian coordinates the dateline crossing will result in a spurious line segment, and the polygon displayed as a patch will not have the interior filled correctly.
The polygons can be reformatted more appropriately for cartesian coordinates using the flatearthpoly
command. The result resembles a map display on a cylindrical projection. The polygon meets the dateline, drops down to the pole, sweeps across the longitudes at the pole, and follows the the dateline up to the other side of the dateline crossing.
See Also
polybool |
Polygon boolean operations |
polyxpoly |
Polygon intersections |
mfwdtran |
Process the map forward transformations |
![]() | flat2ecc | framem | ![]() |