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
I've tried the same thing at much bigger distances and it exhibits the same problem. The radius needs to be double the distance in order to overlap, which makes me think that it is being used as a diameter instead.
The text was updated successfully, but these errors were encountered:
Is this an elasticsearch bug or a spatial4j bug ? The code and comments for SpatialContext.makeCircle() , which is being used , names the parameter distance instead of radius, which seems a bit ambiguous to me
This change fixes the creation circle shapes o it calculates it correctly instead of essentially using the diameter as the radius. The radius has to be converted into degrees but calculating the ratio of the desired radius to the circumference of the earth and then multiplying it by 360 (number of degrees around the earths circumference). This issue here was that it was only multiplied by 180 making the result out by a factor of 2. Also made the test for circles actually check to make sure it has the correct centre and radius.
Closes#7301
colings86
changed the title
Geo-shape circles using radius as diameter
Geo: Geo-shape circles using radius as diameter
Aug 21, 2014
This change fixes the creation circle shapes o it calculates it correctly instead of essentially using the diameter as the radius. The radius has to be converted into degrees but calculating the ratio of the desired radius to the circumference of the earth and then multiplying it by 360 (number of degrees around the earths circumference). This issue here was that it was only multiplied by 180 making the result out by a factor of 2. Also made the test for circles actually check to make sure it has the correct centre and radius.
Closes#7301
This point is less than 700m from the above shape, but the search only matches if you set the radius to 1.4km, ie twice the distance:
I've tried the same thing at much bigger distances and it exhibits the same problem. The radius needs to be double the distance in order to overlap, which makes me think that it is being used as a diameter instead.
The text was updated successfully, but these errors were encountered: