I am working on a hotel application (using ruby on rails), and I am trying to calculate the distance between an hotel and the sea.
I have gathered the geometry of the shoreline points in a geojson file and I am now trying to calculate the distance using the rgeo
gem.
My findings are the following:
when using a simple_mercator_factory
, I obtain an wrong value and when using a spherical_factory
the distance between 2 point is correct, but I calculating the distance between a point and a line yields an error.
How can I calculate this distance ?