Opened 3 years ago
Closed 22 months ago
#1133 closed defect (duplicate)
GEOSDistance raises floating point exceptions for boundable geometries
Reported by: | Brendan Ward | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.11.0 |
Component: | Default | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
GEOSDistance C API function (and likely underlying C++ implementation) is causing floating point overflow exceptions to be raised for certain distances for boundable geometries but not for points.
Test case demonstrating this: https://github.com/libgeos/geos/pull/485
This was encountered in pygeos: https://github.com/pygeos/pygeos/issues/404
For example, calculating the distance between 2 points does not set floating point exceptions, whereas calculating the distance between 2 lines or polygons that are the same distance apart does raise these exceptions.
Change History (5)
comment:1 by , 3 years ago
Milestone: | 3.10.0 → 3.11.0 |
---|
comment:2 by , 3 years ago
This specific issue has been solved in https://github.com/libgeos/geos/pull/485
However there are some situations remaining where a FP “invalid” flag is set:
- binary predicates on empty geometries
- voronoi_polygons on a point
- hausdorff_distance sets an invalid flag (in our seemingly normal test)
- offset_curve on an empty linestring
All through the CAPI. See pygeos https://github.com/pygeos/pygeos/pull/441 for the specific tests where I encountered the FP “invalid” flags.
comment:3 by , 3 years ago
It might be worth opening a github issue now (https://github.com/libgeos/geos/issues) to keep track of this
comment:5 by , 22 months ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Retargeting in prep for GEOS 3.10.0 release