This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# geographic postgis | |
>> DB.get :st.distance( :st.geogfromwkb( :st.makepoint(-122.6764, 45.5165) ), :st.geogfromwkb( :st.makepoint(-122.6864, 45.5265) ) ) | |
=> 1358.549604392 | |
# geomteric postgis (?) | |
>> DB.get :st.distance( :st.transform(:st.setsrid(:st.makepoint(-122.6764, 45.5165), 4326), 3857), :st.transform(:st.setsrid(:st.makepoint(-122.6864, 45.5265), 4326), 3857) ) | |
=> 1939.9894392485 | |
# terraformer ruby (using port of mapattack js gc distance) | |
>> Terraformer::Coordinate.new(-122.6764, 45.5165).great_circle_distance Terraformer::Coordinate.new(-122.6864, 45.5265) | |
=> 1357.7162840942958 | |
# terraformer + mapattack js | |
> gc_distance(new tf.Point([-122.6764, 45.5165]), new tf.Point([-122.6864, 45.5265])); | |
1357.716284094343 |
aaronpk
commented
Apr 19, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment