WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

PolygonCoordinates [poly]

gives a list of coordinates in the polygon poly.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

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 all close all

Basic Examples  (1)

Get the vertex coordinates from a Polygon :

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, {1, 2, 3, 4}];
Wolfram Language code: PolygonCoordinates[𝒫]
Wolfram Language code: Graphics[𝒫]

Scope  (6)

PolygonCoordinates works on polygons:

Wolfram Language code: Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, {1, 2, 3, 4}];
Wolfram Language code: PolygonCoordinates[%]

Triangle:

Wolfram Language code: PolygonCoordinates[Triangle[]]
Wolfram Language code: Graphics[Triangle[]]

Rectangle:

Wolfram Language code: PolygonCoordinates[Rectangle[]]

PolygonCoordinates works on polygons of geographic entities:

Wolfram Language code: PolygonCoordinates[Polygon[["france"]]]//Short[#, 2]&

Polygons with GeoPosition :

Wolfram Language code: Polygon[GeoPosition[{{{40.083441, -88.235716}, {40.083607, -88.257488}, {40.082603, -88.257149}, {40.076136999999996, -88.25740499999999}, {40.076178, -88.270888}, {40.076516, -88.271558}, {40.083686, -88.271512}, {40.083659999999995, -88.267046}, ... 33323}, {40.098112, -88.228687}, {40.095216, -88.228627}, {40.095179, -88.238547}, {40.094480999999995, -88.238546}, {40.094508999999995, -88.23267}, {40.094106, -88.232556}, {40.090666999999996, -88.232477}, {40.090741, -88.235745}}}]];
Wolfram Language code: PolygonCoordinates[%]//Short[#, 2]&

Polygons with GeoPositionXYZ :

Wolfram Language code: Polygon[GeoPositionXYZ[{{{150451.6968462432, -4.884430486484052*^6, 4.085078564164219*^6}, {148595.27532671497, -4.884475441490381*^6, 4.085092666620835*^6}, {148626.35829777512, -4.884546311005128*^6, 4.0850073717259285*^6}, {148618.5908634042 ... 7*^6, 4.0860187668081024*^6}, {150697.56410771207, -4.8836599487428395*^6, 4.085984535480795*^6}, {150711.88303095422, -4.883905546449982*^6, 4.0856924143435075*^6}, {150433.15479548014, -4.883908845676418*^6, 4.0856987003255524*^6}}}]];
Wolfram Language code: PolygonCoordinates[%]//Short[#, 2]&

Polygons with GeoPositionENU :

Wolfram Language code: Polygon[GeoPositionENU[{{{3378.2547059731055, -3369.2234780923936, -0.7440009205072329}, {1521.3211635380246, -3351.391253626573, -0.022340134218666208}, {1550.2571145363192, -3462.8657556618973, -0.08899812728964207}, {1528.5672303494055, -418 ... 63383291193, -0.37494203351275246}, {3654.121991908476, -2566.7472331234085, -0.5214977847472255}, {3375.420726854886, -2558.6597093173914, -0.3648706331350695}}}, GeoPosition[{40.11379115639895, -88.2753251202516, -1.0415787873318691}]]];
Wolfram Language code: PolygonCoordinates[%]//Short[#, 2]&

PolygonCoordinates works on polygons with GeoGridPosition :

Wolfram Language code: Polygon[GeoGridPosition[{{{-0.9950503945490105, 1.2366760550756015}, {-0.9952074890903578, 1.2369207053693891}, {-0.9952196732768064, 1.2369073327446167}, {-0.9953160063787643, 1.236848436956935}, {-0.9954141759436825, 1.2369993898475449}, {-0. ... 197645333103}, {-0.9949098578570917, 1.2368130881428654}, {-0.9948663952535768, 1.2367477711687371}, {-0.9948714472169538, 1.2367426500757825}, {-0.9949211061652593, 1.2367089232486177}, {-0.9949439717990124, 1.236746107097628}}}, "Bonne"]];
Wolfram Language code: PolygonCoordinates[%]//Short

Polygon with holes:

Wolfram Language code: Polygon[{{0, 0}, {3, 0}, {3, 3}, {0, 3}, {1, 1}, {1, 2}, {2, 2}, {2, 1}}, {1, 2, 3, 4} -> {{5, 6, 7, 8}}];
Wolfram Language code: PolygonCoordinates[%]

Polygons with disconnected components:

Wolfram Language code: Polygon[{{0, 0}, {1, 0}, {0, 1}, {1, 1}, {2, 1}, {1, 2}}, {{1, 2, 3}, {4, 5, 6}}];
Wolfram Language code: PolygonCoordinates[%]

Polygons in :

Wolfram Language code: Polygon[{{2, 3, 1, 0}, {6, 9, 1, 0}, {5, 4, 1, 0}, {8, 2, 1, 0}}, {1, 2, 3, 4}];
Wolfram Language code: PolygonCoordinates[%]

Properties & Relations  (3)

Using CanonicalizePolygon to get polygon coordinates:

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {1, 0}, {0.5, 0.8}}];
Wolfram Language code: First[CanonicalizePolygon[𝒫]]
Wolfram Language code: PolygonCoordinates[𝒫]

Using MeshCoordinates to get polygon coordinates:

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {1, 0}, {0.5, 0.8}}];
Wolfram Language code: mesh = BoundaryDiscretizeRegion[𝒫, MaxCellMeasure -> 1]
Wolfram Language code: MeshCoordinates[mesh]
Wolfram Language code: PolygonCoordinates[𝒫]

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

Wolfram Language code: 𝒫 = Polygon[{{0.016027421699362776, 0.276831297955467}, {0.5077817136202725, 0.023714305171669503}, {0.883435505999971, 0.37966194313367274}, {0.8136436053400857, 0.6761206348576514}, {0.9500797352424271, 0.9350184461840005}}, {1, 2, 3, 4, 5}];
Wolfram Language code: SimplePolygonQ[𝒫]
Wolfram Language code: PolygonCoordinates[𝒫]
Wolfram Language code: PolygonCoordinates[OuterPolygon[𝒫]]
Wolfram Research (2019), PolygonCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/PolygonCoordinates.html.

Text

Wolfram Research (2019), PolygonCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/PolygonCoordinates.html.

CMS

Wolfram Language. 2019. "PolygonCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PolygonCoordinates.html.

APA

Wolfram Language. (2019). PolygonCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolygonCoordinates.html

BibTeX

@misc{reference.wolfram_2026_polygoncoordinates, author="Wolfram Research", title="{PolygonCoordinates}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/PolygonCoordinates.html}", note=[Accessed: 14-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_polygoncoordinates, organization={Wolfram Research}, title={PolygonCoordinates}, year={2019}, url={https://reference.wolfram.com/language/ref/PolygonCoordinates.html}, note=[Accessed: 14-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /