OuterPolygon[poly]
gives the outer polygon of the polygon poly.
OuterPolygon
OuterPolygon[poly]
gives the outer polygon of the polygon poly.
Details
- OuterPolygon is also known as polygon outer ring.
- Typically used to decompose a polygon as a difference of simple polygons, even when the original construction of the polygon was using crossing curves etc.
- OuterPolygon is defined by the canonicalization performed in CanonicalizePolygon.
- OuterPolygon gives a polygon of the form Polygon[{p1,p2,…},{{i1,i2,…},…}], where pk are explicit coordinates, and ik are integer indexes referring to coordinates in the list {p1,p2,…}.
- In general, the result will be a Polygon object representing a disjoint union of simple polygons.
Examples
open all close allBasic Examples (1)
Get the outer polygon from a Polygon:
𝒫 = Polygon[{{0, 0}, {5, 0}, {2.5, 4}, {2, 1}, {2, 2}, {3, 2}, {3, 1}}, {1, 2, 3} -> {{4, 5, 6, 7}}];Graphics[𝒫]OuterPolygon[𝒫]Scope (6)
OuterPolygon works on polygons:
Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, {1, 2, 3, 4}]OuterPolygon[%]OuterPolygon[Triangle[]]OuterPolygon[Rectangle[]]OuterPolygon works on polygons of geographic entities:
Polygon[["france"]];OuterPolygon[%]Polygons with GeoPosition:
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}}}]];OuterPolygon[%]Polygons with GeoGridPosition:
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"]];OuterPolygon[%]𝒫 = Polygon[{{0, 0}, {5, 0}, {2.5, 4}, {2, 1}, {2, 2}, {3, 2}, {3, 1}}, {1, 2, 3} -> {{4, 5, 6, 7}}];OuterPolygon[%]Graphics[𝒫]Polygons with disconnected components:
𝒫 = Polygon[{{0, 0}, {1, 0}, {0, 1}, {1, 1}, {2, 1}, {1, 2}}, {{1, 2, 3}, {4, 5, 6}}];OuterPolygon[%]Graphics[𝒫]Polygon[{{2, 3, 1, 0}, {6, 9, 1, 0}, {5, 4, 1, 0}, {8, 2, 1, 0}}, {1, 2, 3, 4}];OuterPolygon[%]Properties & Relations (2)
OuterPolygon of a simple polygon is the polygon itself:
𝒫 = RandomPolygon["Simple"]SimplePolygonQ[𝒫]OuterPolygon[𝒫]A simple polygon has the same polygon coordinates as its OuterPolygon:
𝒫 = Polygon[{{0.5, 0.1}, {0.6, 0.5}, {0.4, 0.6}, {0.2, 0.5}, {0.2, 0.2}}, {1, 2, 3, 4, 5}]SimplePolygonQ[𝒫]PolygonCoordinates[𝒫]PolygonCoordinates[OuterPolygon[𝒫]]Related Guides
History
Text
Wolfram Research (2019), OuterPolygon, Wolfram Language function, https://reference.wolfram.com/language/ref/OuterPolygon.html.
CMS
Wolfram Language. 2019. "OuterPolygon." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OuterPolygon.html.
APA
Wolfram Language. (2019). OuterPolygon. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OuterPolygon.html
BibTeX
@misc{reference.wolfram_2026_outerpolygon, author="Wolfram Research", title="{OuterPolygon}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/OuterPolygon.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_outerpolygon, organization={Wolfram Research}, title={OuterPolygon}, year={2019}, url={https://reference.wolfram.com/language/ref/OuterPolygon.html}, note=[Accessed: 13-June-2026]}