7
$\begingroup$

I'm trying to find the perpendicular geodesics to the path the upcoming solar eclipse will take:

Path:

gpath  = SolarEclipse[ "TotalPhaseCenterLine", EclipseType -> "Total"];

GeoGraphics[gpath, GeoRange -> {{24, 50}, {-128, -63}}]

Solar Path

What I would like are perpendicular lines similar to this image:

eclipse

source: https://www.greatamericaneclipse.com/nation/

So far I can create path offsets relative to the pole:

GeoGraphics[{
    Red, 
    GeoMarker[GeoPosition@#, "Scale" -> Offset[10]],
    Green,
    GeoPath[{GeoPosition@#, GeoDisplacement[{Quantity[1000, "Miles"], 180}]}]
} & /@ gpath[[1]], GeoRange -> {{24, 50}, {-128, -63}}]

Pole lines

Any ideas how I can make the lines orthogonal for the full length of the eclipse path?

$\endgroup$

1 Answer 1

7
$\begingroup$

Take the points of the geo path, and thread the GeoPosition head to have a list of individual geo positions:

points = Thread[gpath[[1]]];

Take them in pairs and compute the direction from the first to the second point in each pair, and add 90 degrees to get the perpendicular (use -90 for the north-pointing geodesics):

directions = GeoDirection @@@ Subsequences[points, {2}] + Quantity[90, "AngularDegrees"];

These are approximate perpendicular geodesics at those points (I'm not sure those are the green lines in the other map you show):

geopaths = MapThread[GeoPath[{#1, Quantity[1000, "Kilometers"], #2}] &, {Most[points], directions}];

Now you can plot everything together:

GeoGraphics[{gpath, Green, geopaths}, GeoRange -> {{24, 50}, {-128, -63}}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.