|
geom |
geog |
rgeo |
0.8510518256839603 |
78198.3596190946 |
postgis |
0.85105182568396 |
78189.9134208575 |
>> f = geomf
=> #<RGeo::Geos::CAPIFactory:0x3ffc62405d50 srid=4326 bufres=8 flags=8>
>> f.point(-122.6764, 45.5165).distance( f.point(-122,45) )
=> 0.8510518256839603
>> f = spherical
=> #<RGeo::Geographic::Factory:0x007ff8c411a3e0 @impl_prefix="Spherical", @point_class=RGeo::Geographic::SphericalPointImpl, ...>
>> f.point(-122.6764, 45.5165).distance( f.point(-122,45) )
=> 78198.3596190946
>> DB.get :st.distance( :st.makepoint(-122.6764, 45.5165), :st.makepoint(-122, 45) )
=> 0.85105182568396
>> DB.get :st.distance(:st.geogfromwkb(:st.makepoint(-122.6764, 45.5165)), :st.geogfromwkb(:st.makepoint(-122, 45)) )
=> 78189.9134208575