Skip to content
New issue

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

help with distance #17

Closed
csanchez opened this issue Dec 5, 2011 · 3 comments
Closed

help with distance #17

csanchez opened this issue Dec 5, 2011 · 3 comments

Comments

@csanchez
Copy link

csanchez commented Dec 5, 2011

Hello i want to know what is the metric for the method distance? i mean the result is in meters, kilometers, miles???

@dazuma
Copy link
Member

dazuma commented Dec 5, 2011

The metric varies depending on the coordinate system being used. For Cartesian coordinate systems, it is simple Euclidean distance in whatever units you are using. The spherical geographic factory measures distances in meters. If you use a geographic factory with an underlying projection, the "distance" is measured in that projection's units.

@dazuma dazuma closed this as completed Dec 5, 2011
@acds
Copy link

acds commented Apr 29, 2012

What about if you want to convert to miles, nautical miles, ft, inches, or boat lengths...

@dazuma
Copy link
Member

dazuma commented Apr 30, 2012

It depends on what coordinate system you are in. For example, if you're in a standard Mercator projection, the units are generally in meters, but you have to scale up as you increase in latitude. You can look up the formula for your particular projection on a variety of websites. RGeo doesn't try to do this for you because there are so many cases---it's different for every single coordinate system, and that only accounts for the known "standard" coordinate systems (of which there are hundreds).

If you need help with a particular use case, ask on the rgeo-users google group. Someone there (probably me) can point you in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants