You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a linestring that crosses the dateline from west to east is decomposed, it creates a segment that spans the globe, producing wrong hits. To reproduce: we index a ">" shaped object crossing the dateline twice and then search by intersection with linesting stretching along prime meridian.
DELETE test
PUT test
{
"mappings": {
"properties": {
"shape": {
"type": "geo_shape"
}
}
}
}
PUT test/_doc/1
{
"shape": "LINESTRING(160 0,200 10,160 20)"
}
POST test/_search
{
"query": {
"geo_shape": {
"shape": {
"shape": "LINESTRING(0 -50,0 50)",
"relation": "intersects"
}
}
}
}
During indexing the decomposition of "LINESTRING(160 0,200 10,160 20)" produces multilinestring ((160.0 0.0, 180.0 5.0),(180.0 5.0, -160.0 10.0, 180.0 15.0),(180.0 15.0, 160.0 20.0)) instead of MULTILINESTRING ((160 0, 180 5), (-180 5, -160 10, -180 15), (180 15, 160 20)) that was produced before. See https://gist.github.com/imotov/cc5d4c42cd9aa1b7dc47d892476f1d46 for illustration of the shapes specified in the repo above, and decomposed shapes in buildS4J and buildGeometry methods. The issue seems to stem from normalizeLon call that was added to buildGeometry and converts -180 to 180.
The text was updated successfully, but these errors were encountered:
Fixes that way linestrings that are crossing the antimeridian are
indexed due to a normalization bug these lines were decomposed into
a line segment that was stretching entire globe.
Fixeselastic#43775
…an (#46601)
Fixes that way linestrings that are crossing the antimeridian are
indexed due to a normalization bug these lines were decomposed into
a line segment that was stretching entire globe.
Fixes#43775
…an (#46601)
Fixes that way linestrings that are crossing the antimeridian are
indexed due to a normalization bug these lines were decomposed into
a line segment that was stretching entire globe.
Fixes#43775
When a linestring that crosses the dateline from west to east is decomposed, it creates a segment that spans the globe, producing wrong hits. To reproduce: we index a ">" shaped object crossing the dateline twice and then search by intersection with linesting stretching along prime meridian.
During indexing the decomposition of
"LINESTRING(160 0,200 10,160 20)"
producesmultilinestring ((160.0 0.0, 180.0 5.0),(180.0 5.0, -160.0 10.0, 180.0 15.0),(180.0 15.0, 160.0 20.0))
instead ofMULTILINESTRING ((160 0, 180 5), (-180 5, -160 10, -180 15), (180 15, 160 20))
that was produced before. See https://gist.github.com/imotov/cc5d4c42cd9aa1b7dc47d892476f1d46 for illustration of the shapes specified in the repo above, and decomposed shapes inbuildS4J
andbuildGeometry
methods. The issue seems to stem fromnormalizeLon
call that was added tobuildGeometry
and converts -180 to 180.The text was updated successfully, but these errors were encountered: