Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Overlaps Raises GeosException #2090

@Eric-Vin

Description

@Eric-Vin

Please note

If you are reporting an installation or module import issue, please note that
this project only accepts reports about problems with packages downloaded from
the Python Package Index. Conda users should take issues to one of the
following trackers:

Expected behavior and actual behavior.

The overlaps method should return a boolean, but instead raises a GeosException, even though both input geometries are valid. The full exception is listed below:

shapely.errors.GEOSException: TopologyException: side location conflict at -18.954926312734656 -132.64786633489828. This can occur if the input geometry is invalid.

Steps to reproduce the problem.

The script below (minimal.py) using the two WKB files (ShapeA, ShapeB) included in Minimal.zip reproduces the issue.

import shapely

with open("ShapeA", "rb") as file_a:
	shape_a = shapely.from_wkb(file_a.read())

with open("ShapeB", "rb") as file_b:
	shape_b = shapely.from_wkb(file_b.read())

assert shape_a.is_valid
assert shape_b.is_valid
shape_a.overlaps(shape_b)

Operating system

PopOS 22.04 LTS

Shapely version and provenance

Shapely 2.0.5 from PyPi

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