Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEO] Optional exception for GeoPoints > 2 dimensions #10685

Closed
nknize opened this issue Apr 20, 2015 · 3 comments
Closed

[GEO] Optional exception for GeoPoints > 2 dimensions #10685

nknize opened this issue Apr 20, 2015 · 3 comments
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes

Comments

@nknize
Copy link
Contributor

nknize commented Apr 20, 2015

Related to #10510 and #10539 the discussion involves adding an optional mapping parameter to throw an exception if an input GeoJSON contains coordinates with >2 dimensions.

The loosely defined GeoJSON spec (at http://geojson.org/geojson-spec.html#positions) states: "There must be at least two elements, and may be more." With no limit on how many elements can be in a coordinate. Since ES currently supports 2D only, it seems natural for default behavior to throw an exception if a coordinate is received with any more than 2 elements. There are a few "user-friendly" questions surrounding this (which have cropped up more than once on the issue list)

  1. Should another validation parameter be added to optionally fail on coordinates > 2d?
  2. Should it be part of the existing 'validate' parameter?
  3. Should the default throw an exception for >2d coordinates forcing users to set the parameter to handle pre-existing geojson data?
@nknize nknize added discuss :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Apr 20, 2015
@rjernst
Copy link
Member

rjernst commented Apr 20, 2015

@nknize You could change the behavior of validate, but only run the additional check if the index was created with new versions of ES (1.6+?).

@nknize
Copy link
Contributor Author

nknize commented Apr 21, 2015

@rjernst I have outstanding pr #10248 that deprecates the "old" validate and normalize options. I can update the behavior there prior to merge /cc @colings86

@imotov
Copy link
Contributor

imotov commented Mar 21, 2018

Superseded by #22917. Closing.

@imotov imotov closed this as completed Mar 21, 2018
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
Projects
None yet
Development

No branches or pull requests

3 participants