Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geoid issue-19 #20

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ $ conda activate iceroad
```


#### Running the code
#### Running whole pipeline
from the ice-road-copters directory for example one can run:
```
$ python scripts/ice-road-pipeline.py <path-to-directory-of-laz-files> -e <path-to-user-supplied-reference-dem> -a <path-to-ASP-directory> -s <path-to-road-shapefile-to-clip-to> -b 3
```
NOTE: this code assumes you are using a reference DEM (and other airborne lidar data) referenced to the WGS84 ellipsoid (EPSG:4326). If your reference DEM Coordinate Reference System (CRS) is orthometric (Geoid) you must set the `-g True` flag. This prompts extraction of the CRS metadata and a subsequent coordinate transform. Users must supply a shape file clipped to the roadway through the domain. During co-registration, this code assumes a buffered road area of 3 meters (1.5m on either side of the centerline of the road). This buffered road area can be modifed with `-b` flag.
Users must supply a shape file clipped to the roadway through the domain. During co-registration, this code assumes a buffered road area of 3 meters (1.5m on either side of the centerline of the road). This buffered road area can be modifed with `-b` flag.

#### Flags
##### Flags

```
-e user_dem Path to user specifed DEM [one will be downloaded from py3dep if you don't supply one]
Expand All @@ -40,28 +40,29 @@ NOTE: this code assumes you are using a reference DEM (and other airborne lidar

-b buffer_meters Total width for the transform area [Default: 3]

-g geoid Is the reference DEM CRS orthometric (geoid height)? Will be auto set to True if you don't supply a DEM [Default: False]

```

NOTE: this code assumes you are using a reference DEM (and other airborne lidar data) referenced to the same vertical datum (ellipsoid vs. geoid). If your vertical datum differs between the two you can use the `geoid_tool.py` to correct this.

#### Optional: If estimating grain size, install R and the following packages
#### Transforming vertical datum

See `ice-road-pipeline.py` for the additional optional flags. This currently requires a target with a known reflectance in order to calibrate lidar reflectance. It assumes wavelength = 1064 nm.
As stated above, if your vertical datum differs between your point cloud and reference DEM use the following to correct your reference,

```
library(raster)
library(lidR)
library(rlas)
library(dplyr)
library(readr)
library(terra)
library(sf)
library(data.table)
$ python scripts/geoid_tool.py <path-to-reference-data> -l <path-to-lidar.laz> -t transform_command -a <dir-to-ASP-bin> -d debug
```
##### Flags

```
-l lidar_path Path to a lidar file you wish to match (it can be small file, just needed for CRS)
-t transform_command which type of transformation to do [Options: to_ellipsoid or to_geoid]
-a asp_dir Directory with ASP binary files [Can be either ASP or ASP/bin directory]
-d debug turns on debugging logging [Options: True or False]

```



### Additional information :books:
The goal of this program is to utilize existing USGS 3DEP 1m topography data (via [py3dep](https://github.com/hyriver/py3dep)) and Ames Stereo Pipeline ([ASP](https://github.com/NeoGeographyToolkit/StereoPipeline)) software to accurately align snow-on airborne lidar point clouds to real world coordinates without the use of ground control points. We also provide an option for a user specified DEM (snow-off).

Expand All @@ -74,3 +75,21 @@ For example, we used prior knowledge that HWY-21 running through our study site
After running pdal processing and ASP post-processing, we are able to generate accurate snow depth maps with road differences on the cm scale.

![snow](./docs/snow.jpeg)



#### Optional: If estimating grain size, install R and the following packages

See `ice-road-pipeline.py` for the additional optional flags. This currently requires a target with a known reflectance in order to calibrate lidar reflectance. It assumes wavelength = 1064 nm.

```
library(raster)
library(lidR)
library(rlas)
library(dplyr)
library(readr)
library(terra)
library(sf)
library(data.table)

```
Loading