Skip to content

Bug in Intersects Operator when Comparing LineString/MultiLineString with MultiLineString #326

Description

@jasonmfehr

The following two queries return false in postgis, but when using the same inputs with com.esri.core.geometry.OperatorIntersects, it returns true. The issue seems to happen when the x values of the first LineString are all between the x-min and x-max of the envelope of the second MultiLineString and at least one y value of the first LineString is between the y-min and y-max of the envelope of the second MultiLineString.

select ST_Intersects(st_geomfromtext('LINESTRING(1 0, 1 1)'), st_geomfromtext('MULTILINESTRING((0 0, 0 1), (2 0, 2 1))'));
select st_intersects(st_geomfromtext('MULTILINESTRING((2 0, 2 2),(3 0, 3 2))'), st_geomfromtext('MULTILINESTRING((0 0, 0 2), (4 0, 4 2))'));

As a workaround, I compare each of the individual LineStrings from the first/second parameters with each other and return true if any of the individual compares return true, return false otherwise.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions