PolygonCoordinates

PolygonCoordinates[poly]

gives a list of coordinates in the polygon poly.

Details

  • PolygonCoordinates is also known as polygon vertex coordinates.
  • PolygonCoordinates is defined by the canonicalization performed in CanonicalizePolygon.
  • PolygonCoordinates gives a list of coordinates {p1,p2,}.
  • For a polygon with self-intersections, the resulting coordinate list will also include intersection points.
  • For a polygon defined with repeated coordinates, the resulting coordinate list removes duplicate coordinates.

Examples

open allclose all

Basic Examples  (1)

Get the vertex coordinates from a Polygon:

Scope  (6)

PolygonCoordinates works on polygons:

Triangle:

Rectangle:

PolygonCoordinates works on polygons of geographic entities:

Polygons with GeoPosition:

Polygons with GeoPositionXYZ:

Polygons with GeoPositionENU:

PolygonCoordinates works on polygons with GeoGridPosition:

Polygon with holes:

Polygons with disconnected components:

Polygons in :

Properties & Relations  (3)

Using CanonicalizePolygon to get polygon coordinates:

Using MeshCoordinates to get polygon coordinates:

A simple polygon has the same polygon coordinates as its OuterPolygon:

Introduced in 2019
 (12.0)