-
Notifications
You must be signed in to change notification settings - Fork 80
Incorrect output of some spatial relationship functions #464
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The aDisjoint and aDwithin functions do not work correctly in the tpoint-geo case.
The aDwithin function is testing for intersection between the trajectory of the tgeompoint and the geometry, which is essentially eDwithin. Instead, it should check for containement of the traj in the geometry.
The aDisjoin function does not take into account linear interpolation of the tpoint and just tests for disjointness at the instants.
To Reproduce
test=# select adisjoint(tgeompoint '[Point(0 0)@2001-01-01, Point(2 0)@2001-01-02]', geometry 'Point(1 0)');
adisjoint
-----------
t
(1 row)
test=# select adwithin(tgeompoint '[Point(0 0)@2001-01-01, Point(2 0)@2001-01-02]', geometry 'Point(1 0)', 0.5);
adwithin
----------
t
(1 row)Expected behavior
test=# select adisjoint(tgeompoint '[Point(0 0)@2001-01-01, Point(2 0)@2001-01-02]', geometry 'Point(1 0)');
adisjoint
-----------
f
(1 row)
test=# select adwithin(tgeompoint '[Point(0 0)@2001-01-01, Point(2 0)@2001-01-02]', geometry 'Point(1 0)', 0.5);
adwithin
----------
f
(1 row)Specifications
test=# select mobilitydb_full_version();
mobilitydb_full_version
---------------------------------------------------------------------------------------------------------------
MobilityDB 1.1.0, PostgreSQL 16.2, PostGIS 3.4.2, GEOS 3.10.2-CAPI-1.16.0, PROJ 8.2.1, JSON-C 0.17, GSL 2.7.1
(1 row)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working