Skip to content

Conversation

@nknize
Copy link
Contributor

@nknize nknize commented Apr 10, 2015

ShapeBuilder's coordinate parser expected 2 double values for every coordinate array. If > 2 doubles were provided the parser terminated parsing of the coordinate array. This resulted in an invalid Shape state leaving LineStrings, LinearRings, and Polygons with a single coordinate. An incorrect parse exception was thrown. This corrects the parser to ignore those values in the 3rd+ dimension, correctly parsing the rest of the coordinate array. Unit tests have been updated to verify the fix.

closes #10510

@nknize nknize added >bug review :Analytics/Geo Indexing, search aggregations of geo points and shapes v1.4.5 v1.6.0 v1.5.2 labels Apr 10, 2015
… dimension

ShapeBuilder's coordinate parser expected 2 double values for every coordinate array. If > 2 doubles were provided the parser terminated parsing of the coordinate array. This resulted in an invalid Shape state leaving LineStrings, LinearRings, and Polygons with a single coordinate. An incorrect parse exception was thrown. This corrects the parser to ignore those values in the 3rd+ dimension, correctly parsing the rest of the coordinate array.

Unit tests have been updated to verify the fix.

closes elastic#10510
@colings86
Copy link
Contributor

We should add this change to the breaking changes doc since it is a change of behaviour. IMO we should have an option in the mapping to decide whether to error on extra dimensions or not and should default to erroring so it is explicit that our geo implementaiton only actually supports 2 dimensions

@nknize nknize removed the review label Apr 21, 2015
@clintongormley clintongormley changed the title [GEO] Correct ShapeBuilder coordinate parser to ignore values in 3rd+ dimension Correct ShapeBuilder coordinate parser to ignore values in 3rd+ dimension May 29, 2015
@nknize nknize deleted the fix/10510 branch May 27, 2016 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug v1.4.5 v1.5.2 v1.6.0 v2.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ES barfs on 3D coordinates

3 participants