I need to measure the physical distance between two places whose names are provided as strings. Since sometimes the names are written slightly differently, I was looking for a library that could help me measure the difference and then combine it with a measure of the latitude and longitude to select the correct matches. Preferred languages: Java or PHP.
Any suggestions?
Have a look at the Levenshtein distance. This is a way of measuring how different two strings are from one another.
Hopefully I understood your question correctly; using "distance" in the same sentence as "latitude and longitude" could be confusing!
Although written in c (with python and tcl bindings), libdistance would be a tool for applying several distances metrics on strings/data.
Metrics included:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With