INTERSECTS with LineString returns wrong results.
@tidwall hi, I test INTERSECTS with LineString, but I gets wrong results. It seems that the first point and the last point of a LineString has been connected when doing INTERSECTS . Can you check it and fix it if the bug exists? Here is my test demo:
set fences cross1 object {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[24,21],[25,21],[25,19],[24,19],[24,21]]]}}
set fences none1 object {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[24,18],[25,18],[25,8],[24,8],[24,18]]]}}
intersects fences ids object {"type":"LineString","coordinates":[[20,20],[30,20],[30,10]]}
the above linestring cross only the fence cross1 , but ["cross1","none1"] is returned, because line [30,10],[20,20] cross the fence none1.
intersects fences ids object {"type":"LineString","coordinates":[[20,20],[30,20],[30,10]**,[30,0],[10,0]**]}
correct result returned when testing another linestring, because line [10,0],[20,20] do not cross the fence none1.

Very strange indeed. I'll need to do some testing on my side and let you know if I get the same results. Stay tuned.
Hi, I recently tested this issue on my machine and was unable to reproduce the problem: the INTERSECTS query with the defined LineString returned ["cross1"] only.
Are you still seeing this problem on your side @yorkxiao ?
@tidwall , given that this issue was reported more than a year ago, perhaps it was resolved in a newer release of Tile38?