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

panic on polygon union #1180

Closed
AntoineRenaud91 opened this issue May 14, 2024 · 1 comment
Closed

panic on polygon union #1180

AntoineRenaud91 opened this issue May 14, 2024 · 1 comment

Comments

@AntoineRenaud91
Copy link

AntoineRenaud91 commented May 14, 2024

The following code snippet panics:

use geo::{BooleanOps, Polygon, LineString, Coord};

fn main() {
   let poly1 = Polygon::new(
        LineString::new(vec![
            Coord {
                x: -10339459.518507583,
                y: 3672178.7824083967,
            },
            Coord {
                x: -10172502.686420029,
                y: 3169028.9498966974,
            },
            Coord {
                x: -10002503.513328442,
                y: 3498113.19617442,
            },
        ]),
        vec![],
    );
    let poly2 = Polygon::new(
        LineString::new(vec![
            Coord {
                x: -10644125.090349106,
                y: 3510000.058398463,
            },
            Coord {
                x: -10010375.27222986,
                y: 3502179.60931681,
            },
            Coord {
                x: -10018249.493188547,
                y: 3506247.294314978,
            },
            Coord {
                x: -10018249.49318854,
                y: 3506247.294314993,
            },
            Coord {
                x: -10320063.446714956,
                y: 3765929.7827082784,
            }
        ]),
        vec![],
    );
    poly2.union(&poly1);
}

The panic message:

thread 'main' panicked at /home/arenaud/.cargo/registry/src/index.crates.io-6f17d22bba15001f/geo-0.28.0/src/algorithm/sweep/vec_set.rs:29:14:
segment not found in active-vec-set: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@AntoineRenaud91
Copy link
Author

Just saw that it relates an other issue.

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

No branches or pull requests

1 participant