We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
More specifically it fails when calculating distance between similar locations and can be repeated by executing following code:
ActiveRecord::Base.connection.select_value "SELECT #{Graticule::Distance::Spherical.to_sql(:latitude => 51.550249, :latitude_column => 51.550249, :longitude => -0.132918, :longitude_column => -0.132918)}"
returns
ActiveRecord::StatementInvalid: PGError: ERROR: input is out of range
The problem is actually ages old http://rubyforge.org/tracker/index.php?func=detail&aid=17922&group_id=2643&atid=10191 but probably too edge case to be taken care of?
The text was updated successfully, but these errors were encountered:
I came up with the following patch (added LEAST(1, ...) to the ACOS argument) https://gist.github.com/716842
LEAST(1, ...)
ACOS
Sorry, something went wrong.
Seems to work great. I've submitted a pull-request with your change to graticule.
Fixed in 40541eb
No branches or pull requests
More specifically it fails when calculating distance between similar locations and can be repeated by executing following code:
ActiveRecord::Base.connection.select_value "SELECT #{Graticule::Distance::Spherical.to_sql(:latitude => 51.550249, :latitude_column => 51.550249, :longitude => -0.132918, :longitude_column => -0.132918)}"
returns
ActiveRecord::StatementInvalid: PGError: ERROR: input is out of range
The problem is actually ages old http://rubyforge.org/tracker/index.php?func=detail&aid=17922&group_id=2643&atid=10191 but probably too edge case to be taken care of?
The text was updated successfully, but these errors were encountered: