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

Tutorial 5 - 3D Topography #14

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Tutorial 5 - 3D Topography #14

wants to merge 12 commits into from

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Nov 17, 2024

Tutorial showcasing 3D perspective plots over Mars and Antarctica using grdview.

Preview image for Olympus Mons, Mars:

3D perspective plot of Olympus Mons, Mars

Preview image for Antarctica:

3D perspective plot of Ross Island, Antarctica

Notes:

  • If anyone wants to test this locally, clone this branch and run jupyter-book build book/
  • I'll convert the *.md file (done in MyST Markdown) into a Jupyter Notebook before merging this PR. Using a markdown file for now just to make it easier to review the code.

TODO:

  • Show how to use grdview for elevation plot with simple colormap over Mars
  • Show how to use grdview to create 3D plot with draped imagery over Antarctica
  • etc

References:

Fixes #11

Tutorial showcasing Mars Orbiter Laser Altimeter (MOLA) dataset, focusing on Olympus Mons. Data loaded via `pygmt.datasets.load_mars_relief`, plotting in 2D with `grdimage`, and in 3D using `grdview`.

 data processing pipeline over Wellington, New Zealand. Doing data loading using laspy, pre-processing with `blockmedian`, gridding with `surface`, and plotting in 2D with `grdimage` and in 3D using `grdview`.
Include tut5_topography in Table of Contents, and citation for the MOLA dataset.
Draft section on plotting an Antarctic DEM with RGB image overlay. Using REMA as the DEM, and Sentinel-2 L2A imagery. Need to mosaic two tiles together using rioxarray for both the DEM and RGB imagery. Have done a quick `grdview` plot based on my old code at weiji14/30DayMapChallenge2021@61f5698.
@andrebelem
Copy link
Collaborator

andrebelem commented Nov 19, 2024

@weiji14
I cloned the repository and tested it on my local machine. It seems that rioxarray needs to be included in the environment.yml file. Is this correct, or am I missing something?

@andrebelem
Copy link
Collaborator

image

@@ -10,3 +10,4 @@ dependencies:
# Optional dependencies
- geopandas=1.0.1
- jupyter-book=1.0.2
- rioxarray=0.17.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cloned the repository and tested it on my local machine. It seems that rioxarray needs to be included in the environment.yml file. Is this correct, or am I missing something?

Yes, added here already 😄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @weiji14,

I’ve tested everything here, and I was planning to add a few more explanations, especially about the pros and cons of data resolution and computational requirements for large mosaics. Should I make these changes directly in the tut5_topography.md file, or should I create a new branch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, feel free to push changes directly (be sure to do a git pull first in case I push any changes too 😉). I'll be adding more text to the Antarctica section too later.

@andrebelem andrebelem marked this pull request as ready for review November 22, 2024 11:52
Copy link
Member

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These maps look quite cool and visually appealing! I especially like the Antarctica map 🙂 !

I'll convert the *.md file (done in MyST Markdown) into a Jupyter Notebook before merging this PR. Using a markdown file for now just to make it easier to review the code.

Yeah, reviewing code and docs in plain text, i.e., normal Python scripts or at least markdown, is so much more convenient!

If anyone wants to test this locally, clone this branch and run jupyter-book build book/

Will try this, hopefully tomorrow, for a more detailed review.

book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
book/tut5_topography.md Outdated Show resolved Hide resolved
[Mollweide projection](https://www.pygmt.org/v0.13.0/projections/misc/misc_mollweide.html).
To get a reddish hue, we'll use a
[colormap](https://docs.generic-mapping-tools.org/6.5/reference/cpts.html)
called `SCM/managua` which comes with a soft hinge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. For me, it works to directly give the name of a Scientific colourmap (without the folder "SCM"). We are also doing this in the PyGMT examples.

Suggested change
called `SCM/managua` which comes with a soft hinge
called `managua` which comes with a soft hinge

Copy link
Member Author

@weiji14 weiji14 Nov 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there's backwards compatibility with just using managua vs SCM/managua (see GenericMappingTools/gmt#6446 (comment)). The SCM/ prefix is intended for better recognition that this is a Scientific Colour Map, see comment at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html:

The color maps are subdivided into a number of sections relating to their source. This avoids name clashes and improves recognision of the color maps as well as their authors

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out this GMT PR! Hm, maybe we should then do this for all tutorials consistently.

weiji14 and others added 3 commits November 24, 2024 17:14
Co-authored-by: Yvonne Fröhlich <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
Explain some of the parameters used for image draping such as `drapegrid`, `surftype` and `zscale`. Moved some explanatory text into a 'tip' admonition cell.
@yvonnefroehlich yvonnefroehlich added the enhancement New feature or request label Nov 28, 2024
@weiji14
Copy link
Member Author

weiji14 commented Dec 2, 2024

@andrebelem or anyone who wants to review, let me know if there's anything else to include, otherwise I'll merge this tomorrow!

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

Successfully merging this pull request may close these issues.

Tutorial 5 - 3-D Topography (Planetary / Antarctic Maps)
3 participants