Rails 4 + Postgres. New to geospatial. Happy to accept solutions that involve RGeo, Geokit, Geocoder, or any other gem that helps solve this issue.
Model contains two fields latitude
and longitude
.
I have an offset
attribute that contains a distance in meters and an orientation
attribute that contains one of the 4 cardinal directions (N, E, W, S).
Example:
offset: 525.5 orientation: W
What's a standard way of adding the offset
distance to the lat-long position, to give me a new lat-long pair as the result of the distance addition?