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

Basic Examples  (3)

Draw a geodesic rectangle on the surface of the Earth:

Draw the complementary region of a geodesic rectangle on the surface of the Earth:

Draw a geodesic rectangle with a hole:

Scope  (9)

Data Specification  (3)

Specify the vertices of a geo polygon as latitude-longitude pairs in degrees:

Give the vertices of a geo polygon as a GeoPosition object:

Use a list of individual GeoPosition objects instead:

Use a geo entity to specify a region:

Specify holes in a geographic region using other geo entities:

Sideness Specification  (4)

Specify one of the two sides of the equator by giving an interior point, for example, a pole:

Specify the opposite pole for the same boundary locations:

Specify geo polygon sideness by giving an exterior point:

Choose the opposite side of the world by indicating that {0, 0} is an exterior point:

Indicate whether the region of interest is the smaller or the larger of the two sides of a closed boundary:

Take the polygon of Portugal as returned by EntityValue:

The polygon boundary is followed clockwise:

Therefore, the interior of Portugal falls on the right of the curve:

Use "LeftArea" to select the left side of the boundary:

Geo Path Types  (2)

By default, the edges of a GeoPolygon object are geodesic segments:

Use loxodromes as edges for a different GeoPolygon object with the same vertices:

Geodesics and great ellipses are similar but not identical on the ellipsoid:

Zoom in around a location in northern Italy to see deviations of the order of a kilometer:

Properties & Relations  (2)

The boundary of a GeoPolygon[locs] object is a closed GeoPath[locs] object:

The same holds for other path types:

GeoPolygon[locs] uniquely defines the positions of all boundary points, both vertices and edges:

Polygon[GeoPosition[locs]] defines the position of the vertices, using straight lines between them:

In other projections, the red GeoPolygon area stays constant, but not the blue area:

Possible Issues  (1)

GeoPolygon boundary segments joining antipodal points may be ambiguous:

That geo polygon was empty because the geodesic joining points and goes through the North Pole, as shown by a small change in the longitude of the first point:

To close the geo polygon through the equator, add an intermediate point on the equator:

To close the geo polygon through the South Pole, add the South Pole as an intermediate point:

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

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_2024_geopolygon, author="Wolfram Research", title="{GeoPolygon}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/GeoPolygon.html}", note=[Accessed: 24-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_geopolygon, organization={Wolfram Research}, title={GeoPolygon}, year={2020}, url={https://reference.wolfram.com/language/ref/GeoPolygon.html}, note=[Accessed: 24-November-2024 ]}