Hi,
I got false positives when searching intersections with a polygon that have aligned points:
For example, after indexing the following FeatureCollection (directly from Kibana):
{
"type": "FeatureCollection",
"name": "testGeoJson_polygon1",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features": [{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[180.0, -36],
[180, 90],
[-180, 90],
[-180, 79],
[16, 58],
[8, 13],
[-180, 74],
[-180, -85],
[-180, -90],
[180, -90],
[180, -85],
[26, 6],
[33, 62],
[180, -36]]]
}
}
]
}
I get this result after filtering the data with a non intersecting box in the Atlantic ocean :
Note that filtering with a non intersecting box in the Indian ocean works correctly.
Now, the filtering is correct if I remove the point [-180, -85]. I've tried with other aligned points and got also incorrect results.
I couldn't see anywhere that geojson polygons with aligned points are invalid so I assume it's a bug from Elasticsearch/Lucene. Note also that I got the same error with ES6.2.3 and ES7.7
Is it really a bug or do I miss something?
Thanks!