How to determine whether two locations are the same (or close)?

Events happening in the community are now at Drupal community events on www.drupal.org.
kirilius's picture

I have a node type with Location enabled on it. Let's call this node type a Place. My users will be able to create Places (for example) they visited. My problem is how to determine if two places are the same by the location information entered by the users. Generally the users will click on a GMap to indicate where the place is. Depending on how precise they are and what level of zoom they used, the points on the map they clicked may be many kilometers apart.
To give you an example: two users visited New York City. The chance that they clicked on the exact same point on the map is almost zero

I am trying to accomplish this: for a given place (node) I want to create a view that shows all other places (created possibly by other users) that MAY BE the same place. That "may be" can be defined by a threshold, for example "less than 20 km apart".

Is that possible with Location and GMap?

Comments

Any comments? Basically my

kirilius's picture

Any comments?

Basically my above request boils down to: how to create a view that takes a node id as an input argument and returns all nodes that are located within a radius of X km from the original node? X can be a filter but it'd better be an argument as well.

slightly different question

3goose's picture

I'm trying to do something similar: I want a view of the X closest nodes of a specific content type on a node page of the same or different content type. I'm willing to pay for help on this and will post any results back here. Thanks!

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: