Re: [android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread Raymond Rodgers
I can't tell you how to add that to an Android app, at least not without doing a fair amount of experimenting that I really don't have the energy to do at the moment, but I will give you some optimization advice instead. I suggest that you reduce the maximum number of results returned in your

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread bob
He's referring to the function here: http://www.thismuchiknow.co.uk/?p=71 #define DEG2RAD(degrees) (degrees * 0.01745327) // degrees * pi over 180 static void distanceFunc(sqlite3_context *context, int argc, sqlite3_value **argv) { // check that we have four arguments (lat1, lon1, lat2, lon

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread Lew
saex, in case you are wondering what just happened, RichardC asked you to increase the effort you put into communicating with those who might volunteer to help you for no reward other than personal goodness. Instead you were rude and condescending, the exact opposite of courtesy, much less eff

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread bob
The easiest way is probably to do this outside of the database using this method in the Locationclass: public float *distanceTo *(Locationdest) Sinc

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread RichardC
So I guess you don't want any help then. On Monday, October 1, 2012 3:11:21 PM UTC+1, saex wrote: > > Obviously the function of the accepted answer. > > El lunes, 1 de octubre de 2012 15:42:59 UTC+2, RichardC escribió: >> >> What function? >> >> You need to put more effort into your questions,

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread saex
Obviously the function of the accepted answer. El lunes, 1 de octubre de 2012 15:42:59 UTC+2, RichardC escribió: > > What function? > > You need to put more effort into your questions, do not expect others to > do all your work for you. > > On Monday, October 1, 2012 2:34:32 PM UTC+1, saex wr

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread RichardC
What function? You need to put more effort into your questions, do not expect others to do all your work for you. On Monday, October 1, 2012 2:34:32 PM UTC+1, saex wrote: > > How can i add that function to my sqlite database in Android? > > and how can i use it ? > > thanks > > El lunes, 1 de oc

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread saex
How can i add that function to my sqlite database in Android? and how can i use it ? thanks El lunes, 1 de octubre de 2012 14:11:06 UTC+2, RichardC escribió: > > > http://stackoverflow.com/questions/3168904/sql-query-to-query-nearby-points-of-interest-based-on-lat-long-sqlite > > > On Monday, Oc

[android-developers] Re: Ordering with SQLITE by nearest latitude & longitude coordinates

2012-10-01 Thread RichardC
http://stackoverflow.com/questions/3168904/sql-query-to-query-nearby-points-of-interest-based-on-lat-long-sqlite On Monday, October 1, 2012 12:53:58 PM UTC+1, saex wrote: > > I must obtain a SQLite SQL Sentence for ordering by nearest latitude and > longitude coordinates, given a initial locatio