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

Fix GeometryFM.contains and expand use of shapely #700

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

Conversation

ecomodeller
Copy link
Member

No description provided.

@jsmariegaard
Copy link
Member

I guess it is not possible to use _point_in_polygon() ?

@ecomodeller
Copy link
Member Author

I guess it is not possible to use _point_in_polygon() ?

I suppose we can, but that is only part of the solution, we still need to construct a proper polygon with holes for the entire domain, unless we loop over all elements, which we could do in a clever way similar to how find_index works (when #685 has been fixed) .

@ecomodeller ecomodeller changed the title Use shapely for Point in Polygon Fix GeometryFM.contains (optional use of shapely) Jun 10, 2024
@ecomodeller ecomodeller changed the title Fix GeometryFM.contains (optional use of shapely) Fix GeometryFM.contains and expand use of shapely Jan 28, 2025
@ecomodeller ecomodeller mentioned this pull request Jan 28, 2025
@ecomodeller
Copy link
Member Author

@jsmariegaard
...plot.outline() is used to plot the outline of the model domain. Very useful!
image

We have the ability to extract elements into a new file, e.g.
image

But the subset has lost the reference to the original model domain.

Does the concept of outline of the model domain still apply for a subset?

@jsmariegaard
Copy link
Member

But the subset has lost the reference to the original model domain.

Does the concept of outline of the model domain still apply for a subset?

I guess it does not in many cases. But the user would probably know that and could accept that the plot.outline() would be empty or raise an error 🤔

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

Successfully merging this pull request may close these issues.

2 participants