({{, (RefLink[GeoPath, paclet:ref/GeoPath])[{(Subscript[loc, 1]),(Subscript[loc, 2])},pathtype]
is a (RefLink[GeoGraphics, paclet:ref/GeoGraphics]) primitive that represents a path of type pathtype between locations (Subscript[loc, 1]) and (Subscript[loc, 2]).}, {, (RefLink[GeoPath, paclet:ref/GeoPath])[{(Subscript[loc, 1]),(Subscript[loc, 2]),…},pathtype]
represents a path formed by joining paths of type pathtype between consecutive locations (Subscript[loc, i]).}, {, (RefLink[GeoPath, paclet:ref/GeoPath])[{(Subscript[loc, 1]),d,α},pathtype]
represents a path moving from location (Subscript[loc, 1]) a distance d with initial bearing α.}, {, (RefLink[GeoPath, paclet:ref/GeoPath])[{{(Subscript[loc, 11]),(Subscript[loc, 12]),…},{(Subscript[loc, 21]),…},…},pathtype]
represents a disjoint collection of paths of type pathtype.}})

OpenersNotesSection(Spacer1)Details and Options

The locations (Subscript[loc, i]) can be specified as latitude and longitude coordinates {lat,lon} in degrees, as (RefLink[GeoPosition, paclet:ref/GeoPosition])[{lat,lon}], or as named entities (RefLink[Entity, paclet:ref/Entity])[…].

Entities will be interpreted as the position determined by their "Position" property.

(RefLink[GeoPath, paclet:ref/GeoPath]) supports the geographic path types:

(RefLink[GeoPath, paclet:ref/GeoPath])[{(Subscript[loc, 1]),…}] represents a path of type "Geodesic".

For multiple locations (Subscript[loc, i]) in a "Geodesic" path, each pair of consecutive locations is joined by a geodesic, but the complete path will not be a geodesic in general. The same can be said of other path types.

A combination of multiple steps of distances (Subscript[d, i]) with respective initial bearings (Subscript[α, i]) can be represented using (RefLink[GeoPath, paclet:ref/GeoPath])[{(Subscript[loc, 1]),(RefLink[GeoDisplacement, paclet:ref/GeoDisplacement])[{(Subscript[d, 1]),(Subscript[α, 1])}],(RefLink[GeoDisplacement, paclet:ref/GeoDisplacement])[{(Subscript[d, 2]),(Subscript[α, 2])}],…},pathtype].

Long paths will generically not appear straight in the map.

Special named geo paths include:

Line thickness can be specified using (RefLink[Thickness, paclet:ref/Thickness]) or (RefLink[AbsoluteThickness, paclet:ref/AbsoluteThickness]), as well as (RefLink[Thick, paclet:ref/Thick]) and (RefLink[Thin, paclet:ref/Thin]).

Line dashing can be specified using (RefLink[Dashing, paclet:ref/Dashing]) or (RefLink[AbsoluteDashing, paclet:ref/AbsoluteDashing]), as well as (RefLink[Dashed, paclet:ref/Dashed]), (RefLink[Dotted, paclet:ref/Dotted]), etc.

Line shading or coloring can be specified using (RefLink[CMYKColor, paclet:ref/CMYKColor]), (RefLink[GrayLevel, paclet:ref/GrayLevel]), (RefLink[Hue, paclet:ref/Hue]), (RefLink[Opacity, paclet:ref/Opacity]), or (RefLink[RGBColor, paclet:ref/RGBColor]).

The option (RefLink[VertexColors, paclet:ref/VertexColors])->{(Subscript[c, 1]),(Subscript[c, 2]),…} can be used to specify that the color of the line should interpolate between colors (Subscript[c, i]) specified for each point.

Joining of line segments can be specified using (RefLink[JoinForm, paclet:ref/JoinForm]).

Line caps can be specified using (RefLink[CapForm, paclet:ref/CapForm]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (31)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Shortest path (geodesic) between two locations:

GeoGraphics[GeoPath[{{-35,-55},{70,100}}],GeoRange->"World",Frame->True]

Line of constant rhumb (loxodrome) between two locations:

GeoGraphics[GeoPath[{GeoPosition[{-33,-55}],GeoPosition[{70,100}]},"Rhumb"],GeoRange->"World"]

Move 500 kilometers along a geodesic from New York:

GeoGraphics[Arrow@GeoPath[{(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]),500000,-120},"Geodesic"]]

Draw a curve of constant bearing between two cities:

GeoGraphics[{Red,GeoPath[{(Entity["Portland", Entity["City",{"Portland","Oregon","UnitedStates"}], "Entity[\"City\", {\"Portland\", \"Oregon\", \"UnitedStates\"}]", "city"]),(Entity["Orlando", Entity["City",{"Orlando","Florida","UnitedStates"}], "Entity[\"City\", {\"Orlando\", \"Florida\", \"UnitedStates\"}]", "city"])},"Rhumb"]}]

Draw the shortest route between several cities:

GeoGraphics[{Red,GeoPath[{(Entity["Portland", Entity["City",{"Portland","Oregon","UnitedStates"}], "Entity[\"City\", {\"Portland\", \"Oregon\", \"UnitedStates\"}]", "city"]),(Entity["Orlando", Entity["City",{"Orlando","Florida","UnitedStates"}], "Entity[\"City\", {\"Orlando\", \"Florida\", \"UnitedStates\"}]", "city"]),(Entity["Boston", Entity["City",{"Boston","Massachusetts","UnitedStates"}], "Entity[\"City\", {\"Boston\", \"Massachusetts\", \"UnitedStates\"}]", "city"])},"Geodesic"]}]

OpenersExampleSection1(Spacer1)Scope  (8)

Locations can be specified in various forms:

GeoGraphics[{Red,GeoPath[{{25,-80},GeoPosition[{42,-88}],(Entity["Los Angeles", Entity["City",{"LosAngeles","California","UnitedStates"}], "Entity[\"City\", {\"LosAngeles\", \"California\", \"UnitedStates\"}]", "city"])}]}]

A geodesic specified by relative displacement from an initial location:

GeoGraphics[{Red,GeoPath[{GeoPosition[{-30,-50}],GeoDisplacement[{(QuantityUnit[5000]),"NorthWest"}]}]}]

A sequence of displacements along rhumb lines from an initial position:

GeoGraphics[{Red,GeoPath[{GeoPosition[{0,0}],GeoDisplacement[{1000000,40}],GeoDisplacement[{500000,-30}],GeoDisplacement[{8000000,-120}],GeoDisplacement[{2000000,0}]},"Rhumb"]}]

Draw several parallels:

GeoGraphics[{Red,GeoPath[{"Parallel",40}],Blue,GeoPath[{"Parallel",10}],Orange,GeoPath[{"Parallel",-40}]}]

Draw meridians, from pole to pole:

GeoGraphics[{Red,GeoPath[{"Meridian",-50}],Blue,GeoPath[{"Meridian",100}]},GeoRange->"World",GeoProjection->"Bonne"]

Draw parts of parallels, from west to east or from east to west:

GeoGraphics[{Thin,Arrow@GeoPath[{"Parallel",40,{-170,140}}],Arrow@GeoPath[{"Parallel",-30,{170,-140}}]},GeoRange->"World"]

Important named geo lines:

GeoGraphics[{Red,GeoPath["Equator"],Orange,GeoPath["NorthernTropic"],GeoPath["SouthernTropic"],Blue,GeoPath["ArcticCircle"],GeoPath["AntarcticCircle"],Green,GeoPath["GreenwichMeridian"],GeoPath["DateLineMeridian"]},GeoProjection->"WinkelTripel"]

Draw the international date line:

GeoGraphics[{Red,GeoPath["DateLine"]},GeoRange->{All,{90,270}},GeoGridLines->(QuantityUnit[15]),Frame->True]

OpenersExampleSection2(Spacer1)Options  (3)

OpenersExampleSubsection0(Spacer1)VertexColors  (2)

A geo path with vertex colors:

GeoGraphics[GeoPath[{{-70,-70},{20,40}},VertexColors->{Blue,Red}]]

A random walk of 100 geodesic steps of 5000 kilometers on the Earth:

GeoGraphics[GeoPath[Flatten[{GeoPosition[{0,0}],Table[GeoDisplacement[{5 (10^6),RandomReal[{0,360}]}],{100}]}],VertexColors->Table[Hue[(i/100)],{i,0,100}]],GeoRange->"World"]

OpenersExampleSubsection1(Spacer1)CurveClosed  (1)

A geo path is not a closed curve in general:

GeoGraphics[GeoPath[{{0,0},{70,120},{40,80}}]]

Close the path by joining the first and last points with a curve of the same type, a geodesic in this case:

GeoGraphics[GeoPath[{{0,0},{70,120},{40,80}},CurveClosed->True]]

OpenersExampleSection3(Spacer1)Applications  (4)

A geo triangle, with geodesic sides, in the "LambertAzimuthal" projection:

geotriangle=FilledCurve[{GeoPath[{{0,0},{0,90},{90,0},{0,0}}]}];

GeoGraphics[geotriangle,GeoProjection->"LambertAzimuthal",GeoRange->"World"]

The same geo triangle in the "Equirectangular" projection:

GeoGraphics[geotriangle,GeoProjection->"Equirectangular",GeoRange->"World"]

Or in the "Bonne" projection:

GeoGraphics[geotriangle,GeoProjection->"Bonne",GeoRange->"World"]

A geo polygon with holes:

GeoGraphics[FilledCurve[{{GeoPath[{"Parallel",45,{-90,90}}],GeoPath[{"Parallel",-45,{90,-90}}]},{GeoCircle[{0,-45},(QuantityUnit[3000])],GeoCircle[{0,45},(QuantityUnit[3000])]}}],GeoRange->"World"]

Several paths with the same displacement data but with different initial positions. Use (RefLink[Arrow, paclet:ref/Arrow]):

GeoGraphics[Table[{Hue[(lat+90)/180],Arrow[GeoPath[{{lat,-90},GeoDisplacement[{10^7,30}]}]]},{lat,-90,90,10}]]

Create tooltips to allow coordinates to be read off geo grid lines drawn as geo paths:

GeoGraphics[{Red,Table[Tooltip[GeoPath[{"Parallel",lat}],SequenceForm["lat == ",lat,°]],{lat,-90,90,15}],Orange,Table[Tooltip[GeoPath[{"Meridian",lon}],SequenceForm["lon == ",lon,°]],{lon,-180,180,30}]},GeoProjection->"Bonne"]

OpenersExampleSection4(Spacer1)Properties & Relations  (7)

A line of constant rhumb (constant angle with respect to all meridians) eventually spirals around a pole:

GeoGraphics[GeoPath[{GeoPosition[{40,0}],31500000,80},"Rhumb"],GeoRange->{{0,90},{-180,180}}]

Take two locations:

p=GeoPosition[{-80,-50}];
q=GeoPosition[{80,50}];

Neither the rhumb line (red) nor the geodesic (green) is a straight line (given for comparison in black), using the default equirectangular geo projection:

GeoGraphics[{Line[{p,q}],Red,GeoPath[{p,q},"Rhumb"],Green,GeoPath[{p,q},"Geodesic"]},GeoRange->"World"]

The rhumb line is straight in the Mercator projection, and now it is superimposed on the black line:

GeoGraphics[{Line[{p,q}],Red,GeoPath[{p,q},"Rhumb"],Green,GeoPath[{p,q},"Geodesic"]},GeoRange->"World",GeoProjection->"Mercator"]

The geodesic is straight in an azimuthal projection centered at one of the points, and now it is superimposed on the black line:

{GeoGraphics[{Line[{p,q}],Red,GeoPath[{p,q},"Rhumb"],Green,GeoPath[{p,q},"Geodesic"]},GeoRange->"World",GeoProjection->{"LambertAzimuthal","Centering"->p}],GeoGraphics[{Line[{p,q}],Red,GeoPath[{p,q},"Rhumb"],Green,GeoPath[{p,q},"Geodesic"]},GeoRange->"World",GeoProjection->{"LambertAzimuthal","Centering"->q}]}

Take a polyhedron:

Graphics3D[gc=N[PolyhedronData["Dodecahedron","GraphicsComplex"]],Boxed->False,Method->{"ShrinkWrap"->True},ImageSize->Small]

Get the latitude and longitude of the vertices on a sphere:

points=Most/@First[GeoPosition[GeoPositionXYZ[gc[[1]],Norm[gc[[1,1]]]]]]

Draw the geodesics among those vertices on a world map:

GeoGraphics[GeoPath[Extract[points,List/@gc[[2,1]]]],GeoRange->"World"]

Use an azimuthal projection:

GeoGraphics[GeoPath[Extract[points,List/@gc[[2,1]]]],GeoRange->"World",GeoProjection->"LambertAzimuthal"]

A geo disk or a geo circle is constructed using the endpoints of geodesics starting from its center:

center=GeoPosition[{50,0}];
radius=4000000;

GeoGraphics[{Red,GeoCircle[center,radius],Blue,Table[GeoPath[{center,GeoDisplacement[{radius,bearing}]}],{bearing,-180,180,30}]}]

The endpoint of a geodesic path may be computed using (RefLink[GeoDestination, paclet:ref/GeoDestination]):

p=GeoPosition[{40,-120}];
c=GeoDisplacement[{4000000,100}];

GeoGraphics[{GeoPath[{p,c}],(Entity["United States", Entity["Country","UnitedStates"], "Entity[\"Country\", \"UnitedStates\"]", "country"])},Frame->True]

q=GeoDestination[p,c]

Check the displacement data of the path using (RefLink[GeoDistance, paclet:ref/GeoDistance]) and (RefLink[GeoDirection, paclet:ref/GeoDirection]):

{GeoDistance[p,q],GeoDirection[p,q]}

Or directly with (RefLink[GeoDisplacement, paclet:ref/GeoDisplacement]):

GeoDisplacement[p,q]

Construct a geodesic path that leaves London with NE direction and goes around the Earth three times:

city=(Entity["London", Entity["City",{"London","GreaterLondon","UnitedKingdom"}], "Entity[\"City\", {\"London\", \"GreaterLondon\", \"UnitedKingdom\"}]", "city"]);
r=Quantity[6367470.,"Meters"];
course=GeoDisplacement[{6Pi r,"NE"},"Geodesic"]

Computations are performed on an ellipsoidal Earth by default. Hence geodesic paths do not close:

GeoGraphics[Arrow@GeoPath[{city,course}],GeoCenter->city,GeoRange->Quantity[150,"Kilometers"]]

Use a spherical model for the Earth. Then the geodesic is closed:

GeoGraphics[Arrow@GeoPath[{city,course}],GeoCenter->city,GeoRange->Quantity[150,"Kilometers"],GeoModel->r]

Or use a great ellipse, which is always closed:

course=GeoDisplacement[{6Pi r,"NE"},"GreatEllipse"]

GeoGraphics[Arrow@GeoPath[{city,course}],GeoCenter->city,GeoRange->Quantity[150,"Kilometers"]]

Take two geo positions:

p=GeoPosition[{20,-85}];
q=GeoPosition[{20,85}];

For the low eccentricity of the Earth, geodesics are close to great ellipses:

GeoGraphics[{GeoPath[{p,q},"GreatEllipse"],Red,GeoPath[{p,q},"Geodesic"]},GeoProjection->"Equirectangular"]

For larger eccentricities, they may differ substantially:

GeoGraphics[{GeoPath[{p,q},"GreatEllipse"],Red,GeoPath[{p,q},"Geodesic"]},GeoProjection->"Equirectangular",GeoModel->{1,0.5}]

OpenersExampleSection5(Spacer1)Interactive Examples  (1)

Compare the geodesic (green line) and the loxodrome (red line) between any two points:

Manipulate[GeoGraphics[{PointSize[0.02],Point[GeoPosition[{lat1,lon1}]],Point[GeoPosition[{lat2,lon2}]],Red,GeoPath[{{lat1,lon1},{lat2,lon2}},"Loxodrome"],Green,GeoPath[{{lat1,lon1},{lat2,lon2}},"Geodesic"]},GeoRange->"World"],{{lat1,45},-90,90},{{lon1,-80},-180,180},{{lat2,-30},-90,90},{{lon2,80},-180,180}]

OpenersExampleSection6(Spacer1)Neat Examples  (3)

Show an effect of the Earth's curvature using four path segments:

start=EntityValue[(Entity["Eiffel Tower", Entity["Building","TourEiffel"], "Entity[\"Building\", \"TourEiffel\"]", "building"]),(EntityProperty["coordinates", EntityProperty["Building","Position"], "EntityProperty[\"Building\", \"Position\"]"])];
course={GeoDisplacement[{(10^5),0}],GeoDisplacement[{(10^5),90}],GeoDisplacement[{(10^5),180}],GeoDisplacement[{(10^5),-90}]};

Draw the four geodesic segments:

GraphicsRow[Apply[GeoGraphics[{Red,PointSize[Large],Point[start],Darker[Green],Thickness[Large],GeoPath[{start,course},"Geodesic"]},##1]&,{{},{GeoCenter->start,GeoRange->(QuantityUnit[2])}},{1}]]

GeoDistance[start,Last[GeoDestination[start,course]]]

Now follow four loxodrome segments instead:

GraphicsRow[Apply[GeoGraphics[{Red,PointSize[Large],Point[start],Darker[Green],Thickness[Large],GeoPath[{start,course},"Loxodrome"]},##1]&,{{},{GeoCenter->start,GeoRange->(QuantityUnit[2])}},{1}]]

Move from the Temple of Zeus along a path given by the first 3141 terms of the continued fraction of π:

start=(Entity["Temple of Zeus", Entity["Building","TempleZeusOlympia"], "Entity[\"Building\", \"TempleZeusOlympia\"]", "building"]);
gclist=GeoDisplacement[{1000#,#}]&/@ContinuedFraction[Pi, 3141];

The path ends just a few miles east of Kossuth, Mississippi:

end=Last@GeoDestination[start, gclist]

First[GeoNearest["City",end]]

GeoDistance[end,%]

Visualize the journey:

GeoGraphics[{Blue,PointSize[Large], Point[start],Darker[Green],GeoPath[{start,gclist}]}]

Study a candidate hexagonal tiling on the Earth. Recursively move from Denver in steps of 100 miles:

p0=GeoPosition[(Entity["Denver", Entity["City",{"Denver","Colorado","UnitedStates"}], "Entity[\"City\", {\"Denver\", \"Colorado\", \"UnitedStates\"}]", "city"])]

d=Quantity[100,"Miles"]

For each geodesic of initial bearing (Subscript[α, 0]), draw two new ones with bearings (Subscript[α, 0])+60 and (Subscript[α, 0])-60:

newConnections[{GeoPath[{p1_,p2_}],{d_,α0_}}]:=Table[{GeoPath[{p2,GeoDestination[p2,{d,α}]}],{d,α}},{α,{α0-60,α0+60}}];
newConnections[list_List]:=Flatten[newConnections/@list,1];

pathList=Cases[NestList[newConnections,Table[{GeoPath[{p0,GeoDestination[p0,{d,α}]}],{d,α}},{α,{0,120,240}}],8],_GeoPath,Infinity];

The resulting set of geodesics does not overlap, due to the curvature of the Earth's surface:

GeoGraphics[{Thin,Opacity[0.4],pathList},ImageSize->Medium]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeoGraphics, paclet:ref/GeoGraphics])  ▪  (RefLink[GeoListPlot, paclet:ref/GeoListPlot])  ▪  (RefLink[GeoCircle, paclet:ref/GeoCircle])  ▪  (RefLink[GeoPosition, paclet:ref/GeoPosition])  ▪  (RefLink[GeoLength, paclet:ref/GeoLength])  ▪  (RefLink[GeoDisplacement, paclet:ref/GeoDisplacement])  ▪  (RefLink[GeoDirection, paclet:ref/GeoDirection])  ▪  (RefLink[GeoDistance, paclet:ref/GeoDistance])  ▪  (RefLink[Line, paclet:ref/Line])  ▪  (RefLink[GeoBoundsRegion, paclet:ref/GeoBoundsRegion])  ▪  (RefLink[TravelDirections, paclet:ref/TravelDirections])  ▪  (RefLink[AnglePath, paclet:ref/AnglePath])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[GeoGraphics, paclet:tutorial/GeoGraphics])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Maps & Cartography, paclet:guide/MapsAndCartography])}, {▪(RefLinkPlain[Locations, Paths, and Routing, paclet:guide/LocationsPathsAndRouting])}, {▪(RefLinkPlain[Symbolic Graphics Language, paclet:guide/SymbolicGraphicsLanguage])}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}, {▪(RefLinkPlain[Geographic Data & Entities, paclet:guide/GeographicData])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/18-geocomputation.html])(WebLink[: Geocomputation, https://www.wolfram.com/language/elementary-introduction/18-geocomputation.html])}})}})