Skip to content

Commit

Permalink
Merge pull request #9 from uw-cryo/jupyterbook
Browse files Browse the repository at this point in the history
Add basic jupyterbook2 website config
  • Loading branch information
scottyhq authored Feb 3, 2025
2 parents 3ce48d2 + 77630ab commit 65e68a0
Show file tree
Hide file tree
Showing 6 changed files with 1,113 additions and 984 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file was created automatically with `myst init --gh-pages` 🪄 💚

name: MyST GitHub Pages Deploy
on:
push:
# Runs on pushes targeting the default branch
branches: [main]
env:
# `BASE_URL` determines the website is served from, including CSS & JS assets
# You may need to change this to `BASE_URL: ''`
BASE_URL: /${{ github.event.repository.name }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install MyST Markdown
run: npm install -g mystmd
- name: Build HTML Assets
run: myst build --html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,6 @@ cython_debug/
# pixi environments
.pixi
*.egg-info

# Jupyter Book (via myst) build outputs
_build
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# 3D_CRS_Transformation_Resources
# 3D CRS Transformation Resources

A centralized repository for resources, documentation and code samples to help the community navigate the confusing, complex, but very important topic of 3D coordinate reference system (CRS) transformations when combining datasets for precise geodetic analysis.
A centralized repository for resources, documentation and code samples to help the community navigate the confusing, complex, but very important topic of 3D coordinate reference system (CRS) transformations when combining datasets for precise geodetic analysis.

This repository was initially created for an improptu community tutorial session led by David Shean and Scott Henderson at the 2023 UW/NASA [ICESat-2 Hackweek event](https://icesat-2-2023.hackweek.io/). We are continuing to review and update materials, including new recipes and examples for commonly used 3D datasets.
This repository was initially created for an improptu community tutorial session led by David Shean and Scott Henderson at the 2023 UW/NASA [ICESat-2 Hackweek event](https://icesat-2-2023.hackweek.io/). We are continuing to review and update materials, including new recipes and examples for commonly used 3D datasets.

## Background
* Awesome ICESat-2 Hackweek 2022 Tutorial from Tyler, Hannah and Scott: https://icesat-2-2022.hackweek.io/tutorials/geospatial/geospatial-advanced.html?highlight=datum
* NSIDC notebook on `iceflow` tool (Kevin Beam) for combining (ICESat, Operation IceBridge and ICESat-2): https://github.com/nsidc/NSIDC-Data-Tutorials/blob/main/notebooks/iceflow/corrections.ipynb
* David's GDA module on CRS and projections: https://uwgda-jupyterbook.readthedocs.io/en/latest/modules/04_Vector1_Geopandas_CRS_Proj/04_Vector1_Geopandas_CRS_Proj_prep.html

### More resources specific to North America
* https://geodesy.noaa.gov/corbin/class_description/NGS_Video_Library.shtml
* https://geodesy.noaa.gov/corbin/class_description/NGS_Video_Library.shtml
* What are Geodetic Datums?
* How Were Geodetic Datums Established?
* What Is the Status of Today’s Geodetic Datums?
* What’s Next for Geodetic Datums?
* https://www.meted.ucar.edu/oceans/navy_geodesy/
* PSU Course GPS and GNSS for Geospatial Professionals (Lesson 5): https://www.e-education.psu.edu/geog862/node/1669
* https://www.dnr.wa.gov/publications/eng_plso_state_plane_coord_refresher.pdf
* https://www.uvm.edu/giv/resources/WGS84_NAD83.pdf
* PSU Course GPS and GNSS for Geospatial Professionals (Lesson 5): https://www.e-education.psu.edu/geog862/node/1669
* https://www.dnr.wa.gov/publications/eng_plso_state_plane_coord_refresher.pdf
* https://www.uvm.edu/giv/resources/WGS84_NAD83.pdf

### Why is this so complicated!?
* The Earth's surface/shape is constantly changing
Expand Down Expand Up @@ -48,7 +48,7 @@ This repository was initially created for an improptu community tutorial session
* https://geodesy.noaa.gov/datums/index.shtml
* https://geodesy.noaa.gov/datums/newdatums/background.shtml
* There is hope! https://geodesy.noaa.gov/datums/newdatums/index.shtml
* https://xkcd.com/2920/
* https://xkcd.com/2920/

### Transformations
* Allows you to go back and forth between different CRS
Expand Down Expand Up @@ -146,15 +146,15 @@ PROJ string:
* Note the 0.105 m uncertainty

## WA DNR LiDAR products
The Washington Department of Natural Resources maintains an excellent lidar portal with subsetting of standardized DSM and DTM products, as well as download of the lidar point clouds. See here: https://lidarportal.dnr.wa.gov/
The Washington Department of Natural Resources maintains an excellent lidar portal with subsetting of standardized DSM and DTM products, as well as download of the lidar point clouds. See here: https://lidarportal.dnr.wa.gov/

### Combining separate lidar tiles in a vrt
Your selected area of interest on the DNR portal may cross the boundaries of the original tiled lidar data. So you will get multiple small DSM/DTM tiles. You can combine these in a virtual raster (vrt) using the `gdalbuildvrt` command (https://gdal.org/programs/gdalbuildvrt.html):
`gdalbuildvrt out_raster.vrt tile1.tif tile2.tif tile3.tif`

Check with gdalinfo: `gdalinfo out_raster.vrt`

Output dimensions and geographic extent should be larger than any individual tile.
Output dimensions and geographic extent should be larger than any individual tile.

Note: To combine multiple point cloud tiles (las/laz), you can use PDAL merge command (https://pdal.io/en/2.6.0/apps/merge.html):
`pdal merge tile1.laz tile2.laz tile3.laz out_merged.laz`
Expand All @@ -165,7 +165,7 @@ All products are distributed using one of two default CRS: either WA State Plane
* EPSG:2927 - NAD83(HARN) / Washington South (ftUS), https://www.spatialreference.org/ref/epsg/2927/
* EPSG:6360 - NAVD88 height (ftUS)

PROJ information about conversion from these coordinate systems to UTM Zone 10N WGS84 with height in meters above the ellipsoid:
PROJ information about conversion from these coordinate systems to UTM Zone 10N WGS84 with height in meters above the ellipsoid:

`projinfo -s EPSG:2927+6360 -t EPSG:32610+4979 -o PROJ --hide-ballpark --spatial-test intersects | less`
```
Expand Down Expand Up @@ -204,7 +204,7 @@ Sample gdalwarp command to transform sample WA DNR LiDAR product for Island Coun
#### NAD83(2011) UTM 10N with height in meters above the NAD83(2011) ellipsoid, and output posting of 1 m
`gdalwarp -s_srs EPSG:2927+6360 -t_srs EPSG:6339+6319 -tr 1.0 1.0 -r cubic -dstnodata -9999 -co COMPRESS=LZW -co TILED=YES -co BIGTIFF=IF_SAFER island_2014_dsm_13.tif island_2014_dsm_13_UTM10N_nad83_2011.tif`

Check output CRS with gdalinfo: `gdalinfo island_2014_dsm_13_UTM10N_nad83_2011.tif`
Check output CRS with gdalinfo: `gdalinfo island_2014_dsm_13_UTM10N_nad83_2011.tif`

Should have the horizontal CRS and a vertical CRS defined with units of meters.

Expand Down
43 changes: 43 additions & 0 deletions myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See docs at: https://mystmd.org/guide/frontmatter
version: 1
project:
id: 3ebf064b-3b32-4a23-92f0-b9a724114c59
title: 3D Coordinate Reference System Transformation Resources
short_title: 3D CRS Guide
description: Notes and code to understand and successfully perform accurate 3D coordinate reference system (CRS) transformations
keywords: [CRS, PROJ, GDAL, Python, Geopandas, Xarray, Geodesy, Datums]
authors: [David Shean, Scott Henderson, Shashank Bhushan]
github: uw-cryo/3D_CRS_Transformation_Resources
abbreviations:
CRS: Coordinate Reference System
WGS84: World Geodetic System 1984
EPSG: European Petroleum Survey Group
ITRF: International Terrestrial Reference Frame
UTM: Universal Transverse Mercator
GNSS: Global Navigation Satellite System
DEM: Digital Elevation Model
settings:
output_matplotlib_strings: remove

toc:
- file: README.md
- title: Examples
children:
- file: examples/3DEP_AK_notes.md
- file: examples/Raster_DEM_3D_Transformation_GDAL.ipynb
- file: examples/Vector_3D_Transformation_GeoPandas.ipynb
- title: Globaldems
children:
- file: globaldems/readme.md
- file: globaldems/cop30.ipynb
- file: globaldems/srtm.ipynb

site:
template: book-theme
options:
# Best to set authors per-page rather than on *all* pages
# https://github.com/jupyter-book/mystmd/issues/1664
hide_authors: true
logo_text: Home
favicon: https://github.com/uw-cryo.png?size=46
logo: https://github.com/uw-cryo.png
Loading

0 comments on commit 65e68a0

Please sign in to comment.