Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapely 1.7 breaks test_polygonize_line_square_cap_style #269

Open
astrojuanlu opened this issue Jan 28, 2020 · 1 comment
Open

Shapely 1.7 breaks test_polygonize_line_square_cap_style #269

astrojuanlu opened this issue Jan 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@astrojuanlu
Copy link
Contributor

$ pytest -k polygonize_line_square_cap_style
========================================================= test session starts ==========================================================
platform linux -- Python 3.7.5, pytest-5.3.4, py-1.8.1, pluggy-0.13.1 -- /home/juanlu/.pyenv/versions/3.7.5/envs/telluric37/bin/python3.7
cachedir: .pytest_cache
rootdir: /home/juanlu/Development/telluric/telluric, inifile: setup.cfg
plugins: cov-2.8.1
collected 1219 items / 1218 deselected / 1 selected                                                                                    

tests/test_geovector.py::test_polygonize_line_square_cap_style FAILED                                                            [100%]

=============================================================== FAILURES ===============================================================
________________________________________________ test_polygonize_line_square_cap_style _________________________________________________

    def test_polygonize_line_square_cap_style():
        diag = 1 / math.sqrt(2)
    
        line = GeoVector(LineString([(0, 0), (1, 1)]))
        expected_result = GeoVector(Polygon([
            (1, 1 + diag), (1 + diag, 1), (0, -diag), (-diag, 0)
        ]))
    
        result = line.polygonize(1, cap_style_line=CAP_STYLE.square)
    
        # Don't use result == expected_result as topology might be different
>       assert result.equals(expected_result)
E       assert False
E        +  where False = <bound method _GeoVectorDelegator.__getattr__.<locals>.delegated_predicate of GeoVector(shape=POLYGON ((0.646446609406...0.7071067811865475, -0.7071067811865475 -5.551115123125783e-17, 0.6464466094067263 1.353553390593274)), crs=EPSG:4326)>(GeoVector(shape=POLYGON ((1 1.707106781186547, 1.707106781186547 1, 0 -0.7071067811865475, -0.7071067811865475 0, 1 1.707106781186547)), crs=EPSG:4326))
E        +    where <bound method _GeoVectorDelegator.__getattr__.<locals>.delegated_predicate of GeoVector(shape=POLYGON ((0.646446609406...0.7071067811865475, -0.7071067811865475 -5.551115123125783e-17, 0.6464466094067263 1.353553390593274)), crs=EPSG:4326)> = GeoVector(shape=POLYGON ((0.6464466094067263 1.353553390593274, 1 1.707106781186547, 1.707106781186547 1, 0.3535533905...-0.7071067811865475, -0.7071067811865475 -5.551115123125783e-17, 0.6464466094067263 1.353553390593274)), crs=EPSG:4326).equals

tests/test_geovector.py:529: AssertionError
@astrojuanlu astrojuanlu added the bug Something isn't working label Jan 28, 2020
@drnextgis
Copy link
Contributor

I think it is because of the GEOS 3.8.0. Faced with the same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants