Skip to content

buffering a polygon results in an empty polygon #200

@pilifly

Description

@pilifly

buffering a polygon by -0.05 created an empty polygon.

libgeos_error
using LibGEOS
points = 
[[-1.980000000392857, -1.1200595222536243], 
[-1.9707179676972442, -1.1547005387729528], 
[1.9600000000000004, -1.1547005387729532], 
[1.9853589842420483, -1.1293415545453502], 
[0.020000000340954713, 2.274760060803972], 
[-0.014641016121955817, 2.284042093302481], 
[-1.980000000392857, -1.1200595222536243]]
poly = LibGEOS.Polygon([points])
dist = -0.05
buffered_poly = LibGEOS.buffer(poly, dist, 40)
@test !LibGEOS.isEmpty(buffered_poly)

Note: test passed when reducing dist to -0.005
dist = -0.005
buffered_poly = LibGEOS.buffer(poly, dist, 40)
@test !LibGEOS.isEmpty(buffered_poly)

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