A polygon is a collection of points representing a two dimensional surface. A Polygon may consist of a exterior ring and a number of interior rings. For a Polygon object to be a valid instance the interior rings cannot cross one another. Additionally, exterior and interior rings of a polygon are individually valid if they do not intersect themselves..
This article is intended to document the implementation details of polygon support within CMR. CMR has support for several metadata input and output formats supported on ingest and as search result formats.
The CMR has two supported coordinate systems, Geodetic and Cartesian. The coordinate system defines the surface of the earth. This impacts what paths a line connecting two points will take, point equality near the poles, and whether the earth is connected across the anti-meridan (-180 longitude to 180 longitude).
The Geodetic Coordinate System represents the Earth as the surface of a sphere. Paths between lines take the shortest path across a sphere. Longitude of a point at either pole is irrelevant. Polygons can contain poles or cross the antimeridian.
- Polygon rings can not contain both the North and South Pole. Containing no poles or one poles is valid. Note that this is a limitation of the current implementation within the CMR. If this is needed the CMR implementation could be updated to allow support for polygon rings containing both poles.
- Consecutive ring points can not be antipodal. Antipodal points are at exactly opposite sides of the earth. Paths follow the shortest path between points. Every possible path along the Earth is the same distance between antipodal points.
The CMR's Cartesian Coordinate System represents the Earth as a flat plane. The X axis of the plane is equivalent to longitude and the Y axis is equivalent to latitude. A path between points will follow the shortest path along a plane. The longitude is significant for points at either pole. For example the point at 0, 90 (longitude, latitude) is not the same as the point at 1,90. These are two different locations within the Cartesian Coordinate System. Polygons will never cross the anti-merdian. The CMR does allow bounding boxes in the Cartesian coordinate system to cross the anti-meridian.
Point order defines the order points are listed in a polygon ring to indicate the interior of an area. Point order can either be clockwise or counter-clockwise. The order used is dependent on the data format and API.
Latitude Longitude Order specifies the order or latitude or longitude in a point when a data format represents a point as a pair of numbers. This won't be applicable for formats like ECHO10 which have separate XML elements for latitude and longitude.
Polygons are closed if the last point is a duplicate of the first point.
Data Format Support
|Data Format||Outer Ring Point Order||Inner Ring Point Order||Lat/Long Order||Closed Polygon|
ISO 19115-2 (19139)
MENDS Implementation (uses GML polygons)
ISO 19115-2 (19139)
|Clockwise||N/A (No Hole support)||Latitude first||Yes|
- No labels