Skip to content

Using the parallel_offset on LineString produces unexpected output #1129

@LuckyLub

Description

@LuckyLub

Expected behavior and actual behavior.

I use the parallel offset in a script to render some geometries. But I ran into an edgecase (?) which resulted in an unexpected output, best described by some pictures, see below. Other datasets, produce result I would expect.

Result:
image
Expectation:
image

Steps to reproduce the problem.

from shapely.geometry import LineString, JOIN_STYLE

my_line = LineString([(-15600.0, -5400.0), (-14600.0, -5400.0), (-14600.0, -3400.0), (-15600.0, -3400.0)])
my_line.parallel_offset(800, join_style=JOIN_STYLE.mitre)

Operating system

Linux Arch

Shapely version and provenance

Shapely==1.7.1 installed from PyPI using pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions