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

Added ability to "drape" line PolyData over a warped mesh. #1310

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ukmo-ccbunney
Copy link
Collaborator

🚀 Pull Request

Description

Provides functionality to "drape" a line PolyMesh (e.g. coastlines, country borders) over an existing mesh that has been warped.

Achieves this by extruding the line mesh upwards and downwards in the geographical vertical direction to create a "wall". The intersection of this with the user provided warped mesh is then calculated and returned as a PolyMesh.

Unfortunately, this can be a very computationally expensive process if either the mesh or the line feature are anything more than course resolution (e.g. 110m resolution for a lines mesh is ok, 50m is slow, 10m is very very slow).

Required some some refactoring of the "coastline" methods in geometry.py to load in arbitrary natural Earth features (e.g. country borders). The actual intersection is done in the load_natural_earth_feature method.

Example added using LFRic orog and Natural Earth country borders:

image

Refctored some of geometry.py to load in arbitrary natural Earth
features (e.g. country borders).
Example added using LFRic orog and Natural Earth country borders.
@ukmo-ccbunney ukmo-ccbunney added new: feature Highlight a new community raised "feature request" issue feature: line projection support labels Jan 31, 2025
@ukmo-ccbunney ukmo-ccbunney self-assigned this Jan 31, 2025
Copy link

welcome bot commented Jan 31, 2025

🚀 Awesome! Your first pull request! Thanks for contributing to geovista! 🚀

@github-actions github-actions bot added type: examples Auto-labelled for ex/*, example/* and examples/* branches type: enhancement Auto-labelled for feat/* and feature/* branches labels Jan 31, 2025
Copy link
Owner

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@ukmo-ccbunney This is awesome and such a cool feature to add to geovista. 🎉

I think that the existing API doesn't quite support the use-case of this feature and we can make that experience a lot slicker. Also, you're hitting a few issues under the hood because of that.

I'm going to make some changes outside this PR to give you better support. I'll ping you on those PRs so that you're aware and involved.

Then we can rebase this PR to unblock it and move forwards.

Does this sound like a reasonable plan?

Also I may have a way to address your performance concerns, but will require some verification and benchmarking before proposing as a potential change 👍

@ukmo-ccbunney
Copy link
Collaborator Author

Sounds great @bjlittle - thanks! It would be good to progress this and I'd be super interested to see what ideas you have for improving the performance 🚀

@bjlittle bjlittle self-assigned this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: line projection support new: feature Highlight a new community raised "feature request" issue type: enhancement Auto-labelled for feat/* and feature/* branches type: examples Auto-labelled for ex/*, example/* and examples/* branches
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

2 participants