Skip to content

turf.area() produces different results when redundant points are added #1987

@reyemtm

Description

@reyemtm

If polygon A shares a partial boundary of a larger polygon B, but is otherwise completely inside polygon B, turf.area() will give a different result for the dissolved result of A and B than B alone.

turf.area(turf.dissolve(A,B)) != turf.area(B)

This can be fixed by running turf.cleanCoords() on the dissolved polygon, at least in initial testing. I will put up an Observable notebook for testing soon.

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