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

Fixes for new inputs #69

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion asp_plot/altimetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def request_atl06sr_multi_processing(
filename="atl06sr",
region=None,
):
# TODO: region wouldn't work for WV with .tif.aux.xml. Fix that.
if not region:
region = Raster(self.dem_fn).get_bounds(latlon=True)

Expand Down Expand Up @@ -562,7 +563,10 @@ def plot_atl06sr(

def atl06sr_to_dem_dh(self):
dem = rioxarray.open_rasterio(self.dem_fn, masked=True).squeeze()
epsg = dem.rio.crs.to_epsg()
# TODO: this won't work for 3D CRS contained in .tif.aux.xml
# Ah I see! We can reproject the ICESat-2 points/gdf to the CRS of the raster maybe, without using the to_epsg code to be safe.
# epsg = dem.rio.crs.to_epsg()
epsg = "PASS A VARIABLE"
for key, atl06sr in self.atl06sr_processing_levels_filtered.items():
atl06sr = atl06sr.to_crs(f"EPSG:{epsg}")

Expand Down Expand Up @@ -623,7 +627,10 @@ def mapview_plot_atl06sr_to_dem(
symm_clim = True

dem = rioxarray.open_rasterio(self.dem_fn, masked=True).squeeze()
# TODO: this won't work for 3D CRS contained in .tif.aux.xml
# Ah I see! We can reproject the ICESat-2 points/gdf to the CRS of the raster maybe, without using the to_epsg code to be safe.
epsg = dem.rio.crs.to_epsg()
epsg = "PASS A VARIABLE"

self.plot_atl06sr(
key=key,
Expand Down
283 changes: 283 additions & 0 deletions notebooks/icesat2_example_dem_comparisons.ipynb

Large diffs are not rendered by default.

Loading