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

Revisit 0c_Data_Preprocessing.ipynb to prepare rasters on common grid with common extent/dimensions #8

Open
dshean opened this issue Jan 4, 2025 · 0 comments

Comments

@dshean
Copy link
Member

dshean commented Jan 4, 2025

https://github.com/uw-cryo/DeepDEM/blob/main/notebooks/0c_Data_Preprocessing.ipynb

A lot of this can be done with vrt, no need to read and write out lots of additional files with slightly different extents.

Right now most of your inputs are pre-processed using identical CRS and resolution by @ShashankBice's scripts. If this is not the case, then I'm concerned about "off-by-one" dimensions in the output from this:

width = np.round((window_read_bounds[2] - window_read_bounds[0])/reference_x_resolution).astype(int)
height = np.round((window_read_bounds[3] - window_read_bounds[1])/reference_y_resolution).astype(int)

'compress': 'deflate', is not necessarily the best option for rasters with continuous float values. Use default of LZW. Should be faster and offer better compression.

The use of resampling=Resampling.nearest can introduce interpolation artifacts - this should always be bilinear or bicubic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant