I agree that having a “nearby” would be great for location-based entries.
Unfortunately Dataview doesn’t support cos(), sqrt() or Javascript/SQL, so we could add our own functions to build queries like “show all entries within 50 km” or the like.
Even better would be if it supported something like distance(lat1, lon1, lat2, lon2, unit) so we could build dataview lists or tables like “list all interesting locations within 20km” or “table of other friends nearby”.
Would be great if, say, visiting a friend and wishing to see interesting places together around his home location. (Which we’d have stored in Obsidian as notes before, together with their location data.)
I think this is interesting enough to ask the dev @blacksmithgu to maybe implement this feature?
As of now, you can at least make a crude list or table sorted by a “flat-earth pseudo-distance” like so:
table location
from "People/Friends & Family"
where file.name != "+Friends & Family TOC"
sort (((this.location[0]-location[0])*(this.location[0]-location[0])) + ((this.location[1]-location[1])*(this.location[1]-location[1])))
limit 5
assuming all people & locations are stored in the People/Friends & Family folder and have a location: entry in the front matter like this:
---
location: [51.133333,10.416667]
---
EDIT: Opened a GitHub Issue, let’s see what comes out of it!