Skip to content

Commit

Permalink
Deploying to gh-pages from @ 3d4fab8 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Dec 23, 2024
1 parent 7bfc45c commit c71dec0
Show file tree
Hide file tree
Showing 18 changed files with 153 additions and 202 deletions.
36 changes: 14 additions & 22 deletions _preview/1/_sources/notebooks/foundations/1_terminology.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tags": []
},
"source": [
"<img src=\"https://www.jpl.nasa.gov/edu/images/news/karin_animation.gif\" alt=\"https://www.jpl.nasa.gov/edu/news/2022/12/8/nasa-mission-takes-a-deep-dive-into-earths-surface-water/ Image credit: NASA/JPL-Caltech\"></img>"
"<img src=\"https://d2pn8kiwq2w21t.cloudfront.net/images/karin_animation.width-1024.gif\" alt=\"https://www.jpl.nasa.gov/edu/news/2022/12/8/nasa-mission-takes-a-deep-dive-into-earths-surface-water/ Image credit: NASA/JPL-Caltech\"></img>"
]
},
{
Expand All @@ -36,7 +36,7 @@
"\n",
"While spherical geometry played an important role historically in the fields of astronomy and navigation, its teaching has largely fallen out of favor since the 1950's making finding comphrenshive resources difficult.\n",
"\n",
"This notebook will cover some of the important and unique terminology used when working with Great Circles and spherical geometry\n",
"This notebook will cover some of the important and unique terminology used when working with Great Circles and spherical geometry.\n",
"\n",
"1. Spherical Geometry\n",
"1. Great Circles\n",
Expand Down Expand Up @@ -77,12 +77,6 @@
"\n",
"<img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/Triangles_%28spherical_geometry%29.jpg/1094px-Triangles_%28spherical_geometry%29.jpg\" alt=\"Great Circle USGS\" width=400></img>\n",
"\n",
"### Spherical Triangles\n",
"TODO: via Spherical trigonometry (Fajardo)\n",
"\n",
"### Napier's Rules\n",
"TODO: via Spherical trigonometry (Fajardo)\n",
"\n",
"### Law of Cosines\n",
"> \"The cosine rule is the fundamental identity of spherical trigonometry: all other identities, including the sine rule, may be derived from the cosine rule\" [(Wikiepedia)](https://en.wikipedia.org/wiki/Spherical_trigonometry)\n",
"\n",
Expand All @@ -93,7 +87,7 @@
"$$cos(c) = cos(a)cos(b) + sin(a)sin(b)cos(C)$$\n",
"### Law of Sines\n",
"\n",
"The spherical law of sines states that angles A, B, and C be the angles opposite of the sides a, b, c, where\n",
"The spherical law of sines states that angles A, B, and C be the angles opposite of the sides a, b, c, where:\n",
"\n",
"$$\\frac{sin(A)}{sin(a)} = \\frac{sin(B)}{sin(b)} = \\frac{sin(C)}{sin(c)}$$\n",
"\n",
Expand All @@ -108,7 +102,7 @@
"\n",
"### Great Circle Path vs. Great Circle Arc\n",
"\n",
"A great circle is the largest circle that can be formed on the surface of a sphere created by the intersection of a plane that also passes through the center of the sphere\n",
"A great circle is the largest circle that can be formed on the surface of a sphere created by the intersection of a plane that also passes through the center of the sphere.\n",
"\n",
"All Great Circles:\n",
"- Intersect the center of the Earth\n",
Expand All @@ -128,9 +122,7 @@
"source": [
"## Ellipsoids vs. Spheres\n",
"\n",
"The earth is not round, instead it is an irregular ellipsoid known as a an oblate spheroid where the poles are slightly flatter. Spherical trigonomeyry assumes a unit sphere, so working on Earth, without additional corrections, spherical measurements will contain up to 0.3% (22 km) when assuming the Earth is a perfect sphere\n",
"\n",
"> TODO: https://gis.stackexchange.com/questions/25494/how-accurate-is-approximating-earth-as-sphere\n",
"The earth is not round, instead it is an irregular ellipsoid known as a an oblate spheroid where the poles are slightly flatter. Spherical trigonomeyry assumes a unit sphere, so working on Earth, without additional corrections, spherical measurements will contain up to 0.3% (22 km) when assuming the Earth is a perfect sphere ([see more](https://gis.stackexchange.com/questions/25494/how-accurate-is-approximating-earth-as-sphere)).\n",
"\n",
"To account for the error when assuming the Earth is a sphere, there are various geodetic systems and ellipsoids to include in calculations."
]
Expand All @@ -146,7 +138,7 @@
"- [`pyproj`: Python interface to PROJ (catographic projections and coordinate transformations library)](https://pyproj4.github.io/pyproj/stable/)\n",
"- [`geopy`: Python client for several popular geocoding web services](https://geopy.readthedocs.io/en/stable/#)\n",
"\n",
"`pyproj` and `geopy` both take advantage of different types of (optional) ellipsoids"
"`pyproj` and `geopy` both take advantage of different types of (optional) ellipsoids."
]
},
{
Expand Down Expand Up @@ -241,11 +233,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**The standard reference ellipsoid for working with Earth is WGS-84**\n",
"### **The standard reference ellipsoid for working with Earth is WGS-84**\n",
"\n",
"`geopy` by default makes use of WGS-84 where \"the mean earth radius as defined by the International Union of Geodesy and Geophysics, (2a + b)/3 = 6371.0087714150598 kilometers approx 6371.009 km (for WGS-84), resulting in an error of up to about 0.5%\" ([geopy](https://geopy.readthedocs.io/en/stable/))\n",
"`geopy` by default makes use of WGS-84 where \"the mean earth radius as defined by the International Union of Geodesy and Geophysics, (2a + b)/3 = 6371.0087714150598 kilometers approx 6371.009 km (for WGS-84), resulting in an error of up to about 0.5%\" ([geopy](https://geopy.readthedocs.io/en/stable/)).\n",
"\n",
"WGS-84 is a unified global ellipsoid model that is used for GPS collected from GPS satellites to calculate extremely preise measurements of the Earth. For the purpose of this notebook, this is the ellipsoid model we will be working with"
"WGS-84 is a unified global ellipsoid model that is used for GPS collected from GPS satellites to calculate extremely preise measurements of the Earth. For the purpose of this notebook, this is the ellipsoid model we will be working with."
]
},
{
Expand All @@ -271,7 +263,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"WGS-84 is an ellipsoid with a semi-major axis of `6378137.0` meters, an inverse flattening feature of `298.257223563`, and a flattening factor of `0.0033528106647474805`\n",
"WGS-84 is an ellipsoid with a semi-major axis of `6378137.0` meters, an inverse flattening feature of `298.257223563`, and a flattening factor of `0.0033528106647474805`.\n",
"\n",
"[Learn more!](https://gisgeography.com/wgs84-world-geodetic-system/)"
]
Expand All @@ -282,7 +274,7 @@
"source": [
"## Geodesy\n",
"\n",
"Geodesy is the complex science of measuring the Earth's \"geometric shape, orientation in space, and gravity field\"\n",
"Geodesy is the complex science of measuring the Earth's \"geometric shape, orientation in space, and gravity field\".\n",
"\n",
"[Learn more!](https://oceanservice.noaa.gov/facts/geodesy.html)\n",
"\n",
Expand Down Expand Up @@ -331,10 +323,10 @@
"source": [
"## Summary\n",
"\n",
"A great circle is formed by a plane intersecting a sphere and the center, like the equator\n",
"A great circle is formed by a plane intersecting a sphere and the center, like the equator.\n",
"\n",
"\n",
"Great Circles make use of spherical geometry to measure features on the curved surface of a unit sphere. However, planets like Earth are not perfect spheres and to account for the error are combined with geodesic calculations to reduce the error in final calculations\n",
"Great Circles make use of spherical geometry to measure features on the curved surface of a unit sphere. However, planets like Earth are not perfect spheres and to account for the error are combined with geodesic calculations to reduce the error in final calculations.\n",
"\n",
"### What's next?\n",
"\n",
Expand All @@ -358,7 +350,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.13.1"
},
"nbdime-conflicts": {
"local_diff": [
Expand Down
24 changes: 11 additions & 13 deletions _preview/1/_sources/notebooks/foundations/2_coordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"metadata": {},
"source": [
"## Overview\n",
"Understanding different types of coordinates for working with unit spheres and ellipsoids\n",
"Understanding different types of coordinates for working with unit spheres and ellipsoids.\n",
"\n",
"1. Types of Coordinates\n",
"1. Convert Coordinates to All Coordinate Types\n",
Expand Down Expand Up @@ -94,9 +94,7 @@
"source": [
"### Geodesic Coordinates\n",
"\n",
"> A geographic coordinate system (GCS) is a spherical or geodetic coordinate system for measuring and communicating positions directly on Earth as latitude and longitude [(Wikipedia)](https://en.wikipedia.org/wiki/Geographic_coordinate_system)\n",
"\n",
"Geodesic coordinates are latitude and longtiude, from -90° South to 90° North and -180° East to 180° West measured from Greenwich\n",
"Geodesic coordinates are latitude and longtiude, from -90° South to 90° North and -180° East to 180° West measured from Greenwich.\n",
"\n",
"<p align=\"center\">\n",
" <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/FedStats_Lat_long.svg/1024px-FedStats_Lat_long.svg.png\" alt=\"Longitude lines are perpendicular to and latitude lines are parallel to the Equator from Wikipedia\" width=400 />\n",
Expand All @@ -109,7 +107,7 @@
"source": [
"### Cartesian Coordinates\n",
"\n",
"Cartesian coordinates describe points in space based on perpendicular axis lines that meet at a singlle point of origin, where any point's position is described based on the distance to the origin along xyz axis\n",
"Cartesian coordinates describe points in space based on perpendicular axis lines that meet at a single point of origin, where any point's position is described based on the distance to the origin along xyz axis.\n",
"\n",
"<p align=\"center\">\n",
" <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Coord_system_CA_0.svg/1024px-Coord_system_CA_0.svg.png\" alt=\"A three dimensional Cartesian coordinate system, with origin O and axis lines X, Y and Z, oriented as shown by the arrows. The tick marks on the axes are one length unit apart. The black dot shows the point with coordinates x = 2, y = 3, and z = 4, or (2, 3, 4) from Wikipedia\" width=400 />\n",
Expand All @@ -119,7 +117,7 @@
"\n",
"**Geodesic to Cartesian Coordinates**\n",
"\n",
"Assuming the earth's radius is 6378137 meters\n",
"Assuming the earth's radius is 6378137 meters:\n",
"\n",
"$$x = radius * cos(latitude) * cos(longitude)$$\n",
"$$y = radius * cos(latitude) * sin(longitude)$$\n",
Expand Down Expand Up @@ -148,7 +146,7 @@
"source": [
"### Spherical Coordinates\n",
"\n",
"Spherical coordinates describe points in space based on three values: radial distance (rho, r) along the radial line between point and the origin, polar angle (theta, θ) between the radial line and the polar axis, and azimuth angle (phi, φ) which is the angle of rotation of the radial line around the polar axis. With a fixed radius, the 3-point coordinates (r, θ, φ) provide a coordinate along a sphere\n",
"Spherical coordinates describe points in space based on three values: radial distance (rho, r) along the radial line between point and the origin, polar angle (theta, θ) between the radial line and the polar axis, and azimuth angle (phi, φ) which is the angle of rotation of the radial line around the polar axis. With a fixed radius, the 3-point coordinates (r, θ, φ) provide a coordinate along a sphere.\n",
"\n",
"- Radial distance: distance from center to surface of sphere\n",
"- Polar angle: angle between radial line and polar axis\n",
Expand Down Expand Up @@ -192,9 +190,9 @@
"source": [
"### Polar Coordinates\n",
"\n",
"Polar coordinates are a combination of latitude, longitude, and altitude from the center of the sphere (based on the radius)\n",
"Polar coordinates are a combination of latitude, longitude, and altitude from the center of the sphere (based on the radius).\n",
"\n",
"Assuming the earth's radius is 6378137 meters\n",
"Assuming the earth's radius is 6378137 meters:\n",
"\n",
"$$x = cos(latitude) * cos(longitude) * radius$$\n",
"$$y = cos(latitude) * sin(longitude) * radius$$\n",
Expand Down Expand Up @@ -230,7 +228,7 @@
"source": [
"### Display Coordinates of Cities\n",
"\n",
"Read in latitude and longitude coordinates from locations"
"First we will read in the latitude and longitude coordinates from locations:"
]
},
{
Expand Down Expand Up @@ -1026,9 +1024,9 @@
"source": [
"## Summary\n",
"\n",
"Coordinates on the Earth are measured in many different types of coordinate systems: Geodesic (latitude/longitude), cartesian, spherical, and polar. These coordinates will make future calculations simpler by converting a 2D coordinate like latitude/longitude into a 3D space that can be used for vector calculations\n",
"Coordinates on the Earth are measured in many different types of coordinate systems: Geodesic (latitude/longitude), cartesian, spherical, and polar. These coordinates will make future calculations simpler by converting a 2D coordinate like latitude/longitude into a 3D space that can be used for vector calculations.\n",
"\n",
"In Python, coordinates can be mapped on to a world map via Matploblib and Cartopy\n",
"In Python, coordinates can be mapped on to a world map via `matplotlib` and `cartopy`.\n",
"\n",
"### What's next?\n",
"\n",
Expand Down Expand Up @@ -1067,7 +1065,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.13.1"
},
"nbdime-conflicts": {
"local_diff": [
Expand Down
42 changes: 21 additions & 21 deletions _preview/1/_sources/notebooks/tutorials/1_arc_path.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"source": [
"## Overview\n",
"\n",
"Imagine a plane, flying from Cario to Hong Kong. To a passenger, the plane appears to travel a straight path, but the plane actually curves around the surface, held down by the gravity of the planet\n",
"Imagine a plane flying from Cario to Hong Kong. To a passenger, the plane appears to travel a straight path, but the plane actually curves around the surface, held down by the gravity of the planet.\n",
"\n",
"Great circles are circles that circumnavigate the globe\n",
"Great circles are circles that circumnavigate the globe.\n",
"\n",
"- Distance between Points on a Great Circle Arc\n",
"- Spherical Distance to Degrees\n",
Expand Down Expand Up @@ -257,11 +257,11 @@
"source": [
"### Determine Distance Mathematically via Unit Sphere\n",
"\n",
"Distance between point A (latA, lonA) and point B (latB, lonB)\n",
"Distance between point A (latA, lonA) and point B (latB, lonB):\n",
"\n",
"$$d=acos(sin(latA)*sin(latB)+cos(latA)*cos(latB)*cos(lonA-lonB))$$\n",
"\n",
"For shorter distances (with less rounding errors)\n",
"For shorter distances (with less rounding errors):\n",
"\n",
"$$d=2*asin(\\sqrt{sin(\\frac{latA-latB}{2})^2 + cos(latA)*cos(latB)*sin(\\frac{lonA-lonB}{2})^2})$$\n",
"\n",
Expand Down Expand Up @@ -306,11 +306,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Additional distance measuerments\n",
"- Haversine (TODO)\n",
"- Vincenty Sphere Great Circle Distance (TODO)\n",
"- Vincenty Ellipsoid Great Circle Distance (TODO)\n",
"- Meeus Great Circle Distance (TODO)"
"Additional types of distance measuerments:\n",
"- Haversine\n",
"- Vincenty Sphere Great Circle Distance\n",
"- Vincenty Ellipsoid Great Circle Distance\n",
"- Meeus Great Circle Distance"
]
},
{
Expand All @@ -319,7 +319,7 @@
"source": [
"### Determine Distance Points via Python Package `pyproj`\n",
"\n",
"`pyproj` accounts for different ellipsoids like `WGS-84`\n",
"`pyproj` accounts for different ellipsoids like `WGS-84`.\n",
"\n",
"First, setup a ellipsoid to represent the Earth (\"WGS-84\"):"
]
Expand Down Expand Up @@ -358,7 +358,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Compared to the distance from the associated airports in Denver and Boston ([DIA to Logan](https://www.greatcirclemap.com/?routes=DEN-BOS)) which has a distance of 2823 km, using Denver instead of Boulder"
"Compared to the distance from the associated airports in Denver and Boston ([DIA to Logan](https://www.greatcirclemap.com/?routes=DEN-BOS)) which has a distance of 2823 km, using Denver instead of Boulder."
]
},
{
Expand All @@ -367,7 +367,7 @@
"source": [
"## Spherical Distance to Degrees\n",
"\n",
"Convert a distance from meters to degrees, measured along the great circle sphere with a constant spherical radius of ~6371 km (mean radius of Earth)\n",
"Convert a distance from meters to degrees, measured along the great circle sphere with a constant spherical radius of ~6371 km (mean radius of Earth).\n",
"\n",
"- See also: [ObsPy `kilometer2degrees()`](https://docs.obspy.org/packages/autogen/obspy.geodetics.base.kilometer2degrees.html)"
]
Expand Down Expand Up @@ -420,7 +420,7 @@
"source": [
"### Determine the Bearing Mathematically via Unit Sphere\n",
"\n",
"Bearing between point A (latA, lonA) and point B (latB, lonB)\n",
"Bearing between point A (latA, lonA) and point B (latB, lonB):\n",
"\n",
"$$x = cos(latA) * sin(latB) - sin(latA) * cos(latB) * cos(lonB - lonA)$$\n",
"$$y = sin(lonB - lonA) * cos(latB)$$\n",
Expand Down Expand Up @@ -453,7 +453,7 @@
"source": [
"### Determine the Bearing via Python Package `pyproj`\n",
"\n",
"`pyproj` accounts for different ellipsoids like `WGS-84`"
"`pyproj` accounts for different ellipsoids like `WGS-84`:"
]
},
{
Expand Down Expand Up @@ -505,7 +505,7 @@
"metadata": {},
"source": [
"### Determine Intermediate Points Mathemetically via Unit Sphere\n",
"Determine the points (lat, lon) a given fraction of a distance (d) between a starting points A (latA, lonA) and the final point B (latB, lonB) where f is a fraction along the great circle arc. `f=0` is point A and `f=1` is point B\n",
"Determine the points (lat, lon) a given fraction of a distance (d) between a starting points A (latA, lonA) and the final point B (latB, lonB) where f is a fraction along the great circle arc. `f=0` is point A and `f=1` is point B.\n",
"\n",
"> Note: The points cannot be antipodal because the path is undefined\n",
"\n",
Expand Down Expand Up @@ -1059,7 +1059,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The midpoint of an arc can be determiend as a fractional distance along an arc where f = 0.5"
"The midpoint of an arc can be determiend as a fractional distance along an arc where f = 0.5."
]
},
{
Expand Down Expand Up @@ -1142,7 +1142,7 @@
"source": [
"## Generate a Great Circle Path\n",
"\n",
"Get points on the Great Cricle defined by two points"
"Get points on the Great Cricle defined by two points."
]
},
{
Expand Down Expand Up @@ -1341,7 +1341,7 @@
"source": [
"## Determine an Antipodal Point\n",
"\n",
"Antipodal is the point on the globe that is on the exact opposite side of the Earth\n",
"Antipodal is the point on the globe that is on the exact opposite side of the Earth.\n",
"\n",
"Antipodal latitude is defined as:\n",
"\n",
Expand Down Expand Up @@ -1516,11 +1516,11 @@
"source": [
"## Summary\n",
"\n",
"Calculating and mapping the midpoint and intermediate points along the great circle arc and closed circle path\n",
"Calculating and mapping the midpoint and intermediate points along the great circle arc and closed circle path.\n",
"\n",
"### What's next?\n",
"\n",
"With a great circle arc defined, determine if a third point is along the arc or at what distance it sits from the great circle arc and path\n"
"With a great circle arc defined, determine if a third point is along the arc or at what distance it sits from the great circle arc and path.\n"
]
},
{
Expand Down Expand Up @@ -1555,7 +1555,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.13.1"
},
"nbdime-conflicts": {
"local_diff": [
Expand Down
Loading

0 comments on commit c71dec0

Please sign in to comment.