• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding nearest location, calculating distance - best way to store and sort info?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding nearest location, calculating distance - best way to store and sort info?


  • Subject: Re: Finding nearest location, calculating distance - best way to store and sort info?
  • From: Paul D Yu <email@hidden>
  • Date: Wed, 3 May 2006 16:18:09 -0400

Matt

I've implemented something like this at www.superdiem.com, where you can find the nearest airports to a zipcode location.

I wrote a query that modeled the suggested Great Circle (based on lat-long) calculation in EOQualifiers, load them into a fetchSpecification and do ec.objectsWithFetchSpecification( fs ); and the result set is what you're looking for.

If you are looking for calculating distance between two lat-longs then that is a simple calculation once you have selected your two pairs.  I would not recommend pre-calculating all you distance pairs.  May be if you are looking to shortest distance calculations you would need to do that, but I didn't find that necessary.


Paul
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: FrontBase license now free!
  • Next by Date: Re: FrontBase license now free!
  • Previous by thread: Re: What is the best way and where to create my array...
  • Next by thread: EOModeler SQL generation
  • Index(es):
    • Date
    • Thread