Skip to content

Unstable behaviour when plotting very small cells #241

@paleolimbot

Description

@paleolimbot

As reported by @mdsumner! I think he reported a crash...this just gives me a snap error. It is probably worth putting a limit on the level of simplification...I think this ends up boiling down to a radius of some kind and there's almost certainly a minimum useful value for that.

library(s2)

x <- s2_cell_polygon(s2_cell_parent(as_s2_cell(wk::xy(-67, 45)), 21))
plot(x, simplify = FALSE)

plot(x)
#> Error in eval(expr, envir, enclos): Snap function moved vertex (0.276288378258184, -0.650895382326694, 0.707106734026236) by 1.00136956986004e-09, which is more than the specified snap radius of 8.90734402968868e-10

Created on 2023-06-12 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions