Ahmed Eldawy created ASTERIXDB-2384:
---------------------------------------

             Summary: spatial-intersect fails with a seemingly degenerate case
                 Key: ASTERIXDB-2384
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2384
             Project: Apache AsterixDB
          Issue Type: Bug
    Affects Versions: 0.9.3
            Reporter: Ahmed Eldawy


The spatial-intersect function fails for a specific case of a polygon 
(triangle) and rectangle.

spatial_intersect(polygon("6.6037665,51.4873692 6.6037664,51.4873691 
6.6037667,51.4873693"), rectangle("-97.2391958,43.499361 
-89.49183334,49.384358"));

Expected output:
false
Actual output: 
ASX0006: Invalid format for spatial-intersect in polygon 
[InvalidDataFormatException]
 
The first polygon is a simple triangle.

If I change the order of the points in the triangle (which is essentially the 
same polygon) it returns false (as expected).

spatial_intersect(polygon("6.6037664,51.4873691 6.6037665,51.4873692 
6.6037667,51.4873693"), rectangle("-97.2391958,43.499361 
-89.49183334,49.384358"));

Works correctly! Output:
false



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to