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

Feature-request: Enable subtracting polygons from graph #41

Open
rdnfn opened this issue Mar 8, 2021 · 0 comments
Open

Feature-request: Enable subtracting polygons from graph #41

rdnfn opened this issue Mar 8, 2021 · 0 comments
Labels

Comments

@rdnfn
Copy link
Member

rdnfn commented Mar 8, 2021

Description: For the policy use-case it would be great if we could subtract a given list of polygons from an existing GeoGraph via a subtraction function with a similar signature as below. By subtracting, I mean any polygon in the graph df has its intersection with the given list of polygons removed. The resulting graph may have fewer nodes than the original.

This would be helpful for building a feature that allows users to evaluate the impact of a land cover change (e.g. removing the given polygons from a habitat) on the habitat. Combining this function with ipyleaflet draw control and the GeoGraphTimeline, it would be relatively simple to allow the user to interactively draw polygons corresponding e.g. to planned infrastructure. Overall, this could be a very powerful feature for policy advisors.

def subtract_pgons_from_graph(graph: geograph.GeoGraph, polygons: List[shapely.Polygon]) -> geograph.GeoGraph:
    """Return graph resulting from subtracting polygons from given graph."""

Note: This feature may be out of scope for pre-report-submission.

@rdnfn rdnfn added kind: enhancement New feature or request concerns: GeoGraph labels Mar 8, 2021
@rdnfn rdnfn changed the title Enable subtracting a polygons from graph Enable subtracting polygons from graph Mar 8, 2021
@rdnfn rdnfn changed the title Enable subtracting polygons from graph Feature-request: Enable subtracting polygons from graph May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant