Skip to content

Regression with GEOS 3.12.0 in Fedora Rawhide #1855

@musicinmybrain

Description

@musicinmybrain

Expected behavior and actual behavior.

Since the GEOS package was updated from 3.11.2 to 3.12.0 in Fedora Rawhide (the development version of the distribution), we are encountering a single test failure:

=================================== FAILURES ===================================
______________ OperationsTestCase.test_parallel_offset_linestring ______________

self = <tests.test_parallel_offset.OperationsTestCase testMethod=test_parallel_offset_linestring>

    def test_parallel_offset_linestring(self):
        line1 = LineString([(0, 0), (10, 0)])
        left = line1.parallel_offset(5, 'left')
        assert_geometries_equal(left, LineString([(0, 5), (10, 5)]))
        right = line1.parallel_offset(5, 'right')
        assert_geometries_equal(right, LineString([(10, -5), (0, -5)]), normalize=True)
        right = line1.parallel_offset(-5, 'left')
        assert_geometries_equal(right, LineString([(10, -5), (0, -5)]), normalize=True)
        left = line1.parallel_offset(-5, 'right')
        assert_geometries_equal(left, LineString([(0, 5), (10, 5)]))

        # by default, parallel_offset is right-handed
        assert_geometries_equal(line1.parallel_offset(5), right)

        line2 = LineString([(0, 0), (5, 0), (5, -5)])
>       assert_geometries_equal(line2.parallel_offset(2, 'left', resolution=1),
                                LineString([(0, 2), (5, 2), (7, 0), (7, -5)]))
E       AssertionError:
E       Geometries are not equal:
E
E       Not equal to tolerance 1e-07
E        x: array(<LINESTRING (0 2, 5 2, 5.39 1.962, 5.765 1.848, 6.111 1.663, 6.414 1.414, 6....>,
E             dtype=object)
E        y: array(<LINESTRING (0 2, 5 2, 7 0, 7 -5)>, dtype=object)

tests/test_parallel_offset.py:32: AssertionError
=========================== short test summary info ============================
FAILED tests/test_parallel_offset.py::OperationsTestCase::test_parallel_offset_linestring
======== 1 failed, 257 passed, 2 skipped, 3 xfailed, 1 xpassed in 0.99s ========

Steps to reproduce the problem.

It’s hard to say how best to reproduce this outside of Fedora infrastructure. It is possible that this might always occur when compiling with GEOS 3.12.0.

Operating system

Fedora Linux Rawhide

Shapely version and provenance

I’m a co-maintainer of the python-shapely package in Fedora Linux. We build from the PyPI sdist (version 2.0.1) without any downstream patches.

Additional comments

I tried packaging a snapshot of https://github.com/shapely/shapely/tree/maint-2.0, but this didn’t seem to make a difference.

Is there anything else I can try to understand this better?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions