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
"ArithmeticException[/ by zero]" when parsing a "polygon" "geo_shape" query with one pair of coordinates #8433
Labels
Comments
astefan
added
>bug
v1.4.0
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
labels
Nov 11, 2014
nknize
added a commit
to nknize/elasticsearch
that referenced
this issue
Nov 13, 2014
… with one pair of coordinates While this commit is primariy a fix for issue/8433 it adds more rigor to ShapeBuilder for parsing against the GeoJSON specification. Specifically, this adds LinearRing and LineString validity checks as defined in http://geojson.org/geojson-spec.html to ensure valid polygons are specified. The benefit of this fix is to provide a gate check at parse time to avoid any further processing if an invalid GeoJSON is provided. More parse checks like these will be necessary going forward to ensure full compliance with the GeoJSON specification. Closes elastic#8433
nknize
added a commit
that referenced
this issue
Nov 19, 2014
…p://geojson.org/geojson-spec.html to ensure valid polygons are specified at parse time. Closes #8433
nknize
added a commit
that referenced
this issue
Nov 19, 2014
…p://geojson.org/geojson-spec.html to ensure valid polygons are specified at parse time. Closes #8433
nknize
added a commit
that referenced
this issue
Nov 19, 2014
…p://geojson.org/geojson-spec.html to ensure valid polygons are specified at parse time. Closes #8433
nknize
added a commit
that referenced
this issue
Nov 24, 2014
… with one pair of coordinates While this commit is primariy a fix for issue/8433 it adds more rigor to ShapeBuilder for parsing against the GeoJSON specification. Specifically, this adds LinearRing and LineString validity checks as defined in http://geojson.org/geojson-spec.html to ensure valid polygons are specified. The benefit of this fix is to provide a gate check at parse time to avoid any further processing if an invalid GeoJSON is provided. More parse checks like these will be necessary going forward to ensure full compliance with the GeoJSON specification. Closes #8433
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
…p://geojson.org/geojson-spec.html to ensure valid polygons are specified at parse time. Closes elastic#8433
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
… with one pair of coordinates While this commit is primariy a fix for issue/8433 it adds more rigor to ShapeBuilder for parsing against the GeoJSON specification. Specifically, this adds LinearRing and LineString validity checks as defined in http://geojson.org/geojson-spec.html to ensure valid polygons are specified. The benefit of this fix is to provide a gate check at parse time to avoid any further processing if an invalid GeoJSON is provided. More parse checks like these will be necessary going forward to ensure full compliance with the GeoJSON specification. Closes elastic#8433
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
For a query like this one:
An "ArithmeticException: / by zero" is returned enclosed in a SearchParseException:
If I increase the number of coordinates for the polygon in the query to two, a more acceptable and meaningful exception is being thrown: "IllegalArgumentException[Invalid number of points in LinearRing (found 2 - must be 0 or >= 4)]". Probably, the same exception should be thrown and returned in case of just one set of coordinates.
The text was updated successfully, but these errors were encountered: