latitutde and longitude with BST

54 views
Skip to first unread message

Ketul Suthar

unread,
Feb 28, 2015, 12:06:40 PM2/28/15
to julia...@googlegroups.com
I am trying find given latitude and longitude is exist or not in my database. so forthat how to create Binary Search tree for storing latitude and longitude from my database.Any one has idea about how to store latitude and longitude in BST node. Is BST suitable data structure for storing latitude and longitude?

Seth

unread,
Feb 28, 2015, 3:26:58 PM2/28/15
to julia...@googlegroups.com
Hoping I'm not misunderstanding the question, but...

If all you're doing is testing to see whether a lat/long pair is in some datastore, then you might be able to use julia sets (of immutables/pairs). If you're doing calculations with lat/long, you'll probably want to store your data in something like KDTrees.jl that will give you nearest neighbors and other analysis tools.

If speed is important and you only care if a lat/long pair is NOT in your database, you might look at something like Bloom filters.
Reply all
Reply to author
Forward
0 new messages