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.
The following two queries return
falsein postgis, but when using the same inputs withcom.esri.core.geometry.OperatorIntersects, it returnstrue. 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.As a workaround, I compare each of the individual LineStrings from the first/second parameters with each other and return
trueif any of the individual compares returntrue, returnfalseotherwise.