Skip to content

Bug DStabilityModel connect_layers #240

@KentropDevelopment

Description

@KentropDevelopment

There's an issue with the procedure to add points of adjacent layers to a newly added layer. The implementation is in the connect_layers method of the DStabilityModel. It converts the to-be-added layer and an existing layer to linestrings, makes a union of the two and then uses the shapely operation polygonize to turn them into polygons. Finally it checks if the result of polygonize has two polygons. If it doesn't, then the original polygons are returned.

Works like a charm, except when there are layers enclosed by the two layers under consideration. See the example beneath, where the blue and orange layers are being considered. polygonize then also creates the green enclosed layer. This results in three polygons, hence the original polygons are returned because there are more than two polygons. Resulting in an invalid geometry.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions