Cam
Camโ€ข9mo ago

How can I create a table that is capable of location based queries (Geospatial)

I would like to be able to query by distance, and sort closest to farthest, as can be done in mongodb or postgis. I can use some trickery to locate lat/lon coordinates 'near-ish' by treating them as floats and using greater than and less than in a pseudo between query, and then sort/filter in TS using the haversine formulae. I don't mind doing that as a work around for now. But Geo queries would be a fantastic feature!
3 Replies
justin
justinโ€ข9mo ago
Geohashes would do it
FleetAdmiralJakob ๐Ÿ—• ๐Ÿ—— ๐Ÿ—™
I had the same question. I hope the blog post is coming soon. https://discord.com/channels/1019350475847499849/1220366356915163277
FleetAdmiralJakob ๐Ÿ—• ๐Ÿ—— ๐Ÿ—™
GitHub
Weather-App/packages/city-data/convex/getCity.ts at master ยท The-Cr...
The best weather app that's 100% OSS, collects no data and not showing any ads - The-Creative-Programming-Group/Weather-App

Did you find this page helpful?