GeoPolygon[{loc1,…,locn}]
is a GeoGraphics primitive that represents a filled polygon whose boundary is formed by geodesic segments between locations loci and loci+1.
GeoPolygon[{loc1,…,locn}{{q1,…,qm},…}]
represents a geo polygon with holes {q1,…,qm}, ….
GeoPolygon[{poly1,poly2,…}]
represents a collection of polygons polyi.
GeoPolygon[{poly1,poly2,…},sideness]
specifies which of the two sides of each boundary polyi is in the interior of the geo polygon.
GeoPolygon[polys,sideness,pathtype]
represents a geo polygon whose boundary is formed by geo paths of type pathtype.
GeoPolygon
GeoPolygon[{loc1,…,locn}]
is a GeoGraphics primitive that represents a filled polygon whose boundary is formed by geodesic segments between locations loci and loci+1.
GeoPolygon[{loc1,…,locn}{{q1,…,qm},…}]
represents a geo polygon with holes {q1,…,qm}, ….
GeoPolygon[{poly1,poly2,…}]
represents a collection of polygons polyi.
GeoPolygon[{poly1,poly2,…},sideness]
specifies which of the two sides of each boundary polyi is in the interior of the geo polygon.
GeoPolygon[polys,sideness,pathtype]
represents a geo polygon whose boundary is formed by geo paths of type pathtype.
Details
- GeoPolygon[…] describes a 2D geographic region on the Earth or another geo model. It can be used in geo visualization functions like GeoGraphics or in geo computations like GeoArea.
- In GeoPolygon[{loc1,…,locn}], the boundary {loc1,…,locn} divides the world in two complementary regions, and by default GeoPolygon[{loc1,…,locn}] and GeoPolygon[{loc1,…,locn},Automatic] refer to the smaller one. Possible ways to specify the region are:
-
GeoPolygon[locs{intloc}] intloc is an interior location to the geo polygon GeoPolygon[locs,extloc] extloc is an exterior location to the geo polygon GeoPolygon[locs,"SmallerArea"] the interior of the geo polygon is the smaller region GeoPolygon[locs,"LargerArea"] the interior of the geo polygon is the larger region GeoPolygon[locs,"LeftArea"] the interior is to the left as locs are traversed GeoPolygon[locs,"RightArea"] the interior is to the right as locs are traversed - The locations loci can be specified as latitude and longitude coordinates {lat,lon} in degrees, as GeoPosition[{lat,lon}] or as named entities Entity[…].
- Entities will be interpreted as the position determined by their "Position" property.
- GeoPolygon supports the geographic path types:
-
"Geodesic" geodesic path between points "Rhumb","RhumbLine","Loxodrome" path of constant bearing between points "GreatEllipse","GreatCircle" path on a plane through Earth's center
Examples
open all close allBasic Examples (3)
Draw a geodesic rectangle on the surface of the Earth:
GeoGraphics[GeoPolygon[{{-30, -60}, {-30, 60}, {30, 60}, {30, -60}}]]Draw the complementary region of a geodesic rectangle on the surface of the Earth:
GeoGraphics[GeoPolygon[{{-30, -60}, {-30, 60}, {30, 60}, {30, -60}}, "LargerArea"]]Draw a geodesic rectangle with a hole:
GeoGraphics[GeoPolygon[{{-30, -60}, {-30, 60}, {30, 60}, {30, -60}} -> {{{-15, -30}, {-15, 30}, {15, 30}, {15, -30}}}]]Scope (8)
Data Specification (3)
Specify the vertices of a geo polygon as latitude-longitude pairs in degrees:
GeoPolygon[{{10, -50.6}, {70, 0.2}, {20, 30}, {-30, 0}}]Give the vertices of a geo polygon as a GeoPosition object:
GeoGraphics[GeoPolygon[GeoPosition[{{10, -50.6}, {70, 0.2}, {20, 30}, {-30, 0}}]]]Use a list of individual GeoPosition objects instead:
GeoGraphics[GeoPolygon[{GeoPosition[{10, -50.6}], GeoPosition[{70, 0.2}], GeoPosition[{20, 30}], GeoPosition[{-30, 0}]}]]Use a geo entity to specify a region:
GeoGraphics[GeoPolygon[Entity["Country", "UnitedStates"]]]Specify holes in a geographic region using other geo entities:
GeoGraphics[{EdgeForm[Directive[Thick, Red]], GeoPolygon[Entity["Country", "UnitedStates"] -> {Entity["AdministrativeDivision", {"Illinois", "UnitedStates"}], Entity["AdministrativeDivision", {"Kansas", "UnitedStates"}], Entity["AdministrativeDivision", {"California", "UnitedStates"}]}]}]Sideness Specification (4)
Specify one of the two sides of the equator by giving an interior point, for example, a pole:
GeoPolygon[{{0, 0}, {0, 90}, {0, 180}, {0, -90}} -> {90, 0}]GeoGraphics[%, GeoRange -> "World"]Specify the opposite pole for the same boundary locations:
GeoPolygon[{{0, 0}, {0, 90}, {0, 180}, {0, -90}} -> {-90, 0}]GeoGraphics[%, GeoRange -> "World"]Specify geo polygon sideness by giving an exterior point:
GeoGraphics[GeoPolygon[{{-50, -50}, {50, 0}, {-50, 50}}, {70, 0}]]Choose the opposite side of the world by indicating that {0, 0} is an exterior point:
GeoGraphics[{GeoMarker[{0, 0}], GeoPolygon[{{-50, -50}, {50, 0}, {-50, 50}}, {0, 0}]}]Indicate whether the region of interest is the smaller or the larger of the two sides of a closed boundary:
{GeoGraphics[GeoPolygon[{{-50, -50}, {50, 0}, {-50, 50}}, "SmallerArea"]], GeoGraphics[GeoPolygon[{{-50, -50}, {50, 0}, {-50, 50}}, "LargerArea"]]}Take the polygon of Portugal as returned by EntityValue:
pol = EntityValue[Entity["Country", "Portugal"], "Polygon"]The polygon boundary is followed clockwise:
GeoGraphics[{Arrowheads[Large], Arrow[GeoPath@@pol]}]Therefore, the interior of Portugal falls on the right of the curve:
Append[GeoPolygon@@pol, "RightArea"]GeoGraphics[%, GeoCenter -> Entity["City", {"Lisbon", "Lisboa", "Portugal"}], GeoRange -> Quantity[500, "Miles"]]Use "LeftArea" to select the left side of the boundary:
Append[GeoPolygon@@pol, "LeftArea"]GeoGraphics[%, GeoCenter -> Entity["City", {"Lisbon", "Lisboa", "Portugal"}], GeoRange -> Quantity[500, "Miles"]]Geo Path Types (1)
By default, the edges of a GeoPolygon object are geodesic segments:
GeoGraphics[GeoPolygon[{{-60, -60}, {60, 60}, {-60, 60}}]]Use loxodromes as edges for a different GeoPolygon object with the same vertices:
GeoGraphics[GeoPolygon[{{-60, -60}, {60, 60}, {-60, 60}}, Automatic, "Loxodrome"]]Properties & Relations (2)
The boundary of a GeoPolygon[locs] object is a closed GeoPath[locs] object:
locs = {{0, 0}, {40, -90}, {70, 0}};GeoGraphics[{GeoPolygon[locs], Red, GeoPath[locs, CurveClosed -> True]}]The same holds for other path types:
GeoGraphics[{GeoPolygon[locs, Automatic, "Loxodrome"], Red, GeoPath[locs, "Loxodrome", CurveClosed -> True]}]GeoPolygon[locs] uniquely defines the positions of all boundary points, both vertices and edges:
locs = {{85, -90}, {60, -35}, {0, 0}, {85, -90}};GeoGraphics[{Red, GeoPolygon[locs]}, GeoProjection -> "Equirectangular"]Polygon[GeoPosition[locs]] defines the position of the vertices, using straight lines between them:
GeoGraphics[{Blue, Polygon[GeoPosition[locs]]}, GeoProjection -> "Equirectangular"]In other projections, the red GeoPolygon area stays constant, but not the blue area:
Show[%%, %, GeoProjection -> {"Orthographic", "Centering" -> {60, -15}}, GeoRange -> Quantity[3000, "Miles"], GeoGridLines -> Automatic]Tech Notes
Related Guides
History
Text
Wolfram Research (2020), GeoPolygon, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoPolygon.html.
CMS
Wolfram Language. 2020. "GeoPolygon." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GeoPolygon.html.
APA
Wolfram Language. (2020). GeoPolygon. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoPolygon.html
BibTeX
@misc{reference.wolfram_2026_geopolygon, author="Wolfram Research", title="{GeoPolygon}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/GeoPolygon.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_geopolygon, organization={Wolfram Research}, title={GeoPolygon}, year={2020}, url={https://reference.wolfram.com/language/ref/GeoPolygon.html}, note=[Accessed: 12-June-2026]}