njtierney / maxcovr

Tools in R to make it easier to solve the Maximal Coverage Location Problem
https://njtierney.github.io/maxcovr/
GNU General Public License v3.0
43 stars 12 forks source link

distance calculation #67

Closed carbonmetrics closed 6 years ago

carbonmetrics commented 6 years ago

This is more a clarification than an issue: what coordinate system are you using? Are you always expecting WGS84?

njtierney commented 6 years ago

Hello,

The distance is calculated using haversines formula, which makes the assumption that the earth is a sphere - whilst not wholly correct, it is a useful approximation that is reasonable for small scale distances (1-10km), which is what maxcovr was initially built for.

In the future maxcovr will use more accurate distance functions provided in geodist. I found this thread useful when understanding this problem.

I've added a note into the README under Known Issues - I am glad you raised this issue!

Thank you for your inputs!