Latitude/Longitude and Lexigraphical search

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Latitude/Longitude and Lexigraphical search

Andrew Boyd
Hi All,
  I'm wanting to do some range queries using latitude and longitude.

I have numbers like so:

long           lat    
-84.65532   32.74212

What would be the best way to store this in lucene so I can do a range query?

Also for all you smart people out there do you know the distance between the decimal places?
What I mean is if the long is constant what is the distance (miles, kilometers, feet etc) between

32.74213 - 32.74212   = .00001 = ?distance?
32.74222 - 32.74212   = .00010 = ?distance?

Thanks,

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Latitude/Longitude and Lexigraphical search

Bill Tschumy

On May 8, 2005, at 11:26 AM, Andrew Boyd wrote:

> Hi All,
>   I'm wanting to do some range queries using latitude and longitude.
>
> I have numbers like so:
>
> long           lat
> -84.65532   32.74212
>
> What would be the best way to store this in lucene so I can do a  
> range query?
>
> Also for all you smart people out there do you know the distance  
> between the decimal places?
> What I mean is if the long is constant what is the distance (miles,  
> kilometers, feet etc) between
>
> 32.74213 - 32.74212   = .00001 = ?distance?
> 32.74222 - 32.74212   = .00010 = ?distance?
>
> Thanks,
>
> Andrew
>

If longitude is held constant, then each degree of latitude is  
111.3171 kilometers.

The distance between degrees of longitude is more complicated and  
depends upon what latitude you are at.

There are a lot of sites on the web that will do the calculations for  
you.  This one:

<http://jan.ucc.nau.edu/~cvm/latlongdist.html>

will accept a format of either decimal degrees or degrees, minutes,  
seconds.  It is easy to convert between the two knowing that there  
are 60 minutes in a degree and 60 seconds in a minute.

The above URL also gives the equations for calculating distance  
assuming you want to write some code to do this.

--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Latitude/Longitude and Lexigraphical search

Sven Duzont-2
In reply to this post by Andrew Boyd
Hello Andrew,

There already is a plugin available for Nutch :
http://wiki.apache.org/nutch/GeoPosition
I think that one can easily integrate it into a lucene app (i'll make
some experimentations with it soon)

----
 Sven

Le dimanche 8 mai 2005 ? 18:26:14, vous ?criviez :

AB> Hi All,
AB>   I'm wanting to do some range queries using latitude and longitude.

AB> I have numbers like so:

AB> long           lat    
AB> -84.65532   32.74212

AB> What would be the best way to store this in lucene so I can do a range query?

AB> Also for all you smart people out there do you know the
AB> distance between the decimal places?
AB> What I mean is if the long is constant what is the distance
AB> (miles, kilometers, feet etc) between

AB> 32.74213 - 32.74212   = .00001 = ?distance?
AB> 32.74222 - 32.74212   = .00010 = ?distance?

AB> Thanks,

AB> Andrew

AB> ---------------------------------------------------------------------
AB> To unsubscribe, e-mail: [hidden email]
AB> For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Latitude/Longitude and Lexigraphical search

Andrew Boyd
In reply to this post by Andrew Boyd
Thanks for the pointers

I'm going to store the long as E086.656530 or W086.656530

and the lat as N34.74212 or S34.74212

that should at least keep the lexographic search happy.

I'm still reading the math pointer.

thanks!

Andrew

-----Original Message-----
From: Sven Duzont <[hidden email]>
Sent: May 8, 2005 1:29 PM
To: Andrew Boyd <[hidden email]>
Subject: Re: Latitude/Longitude and Lexigraphical search

Hello Andrew,

There already is a plugin available for Nutch :
http://wiki.apache.org/nutch/GeoPosition
I think that one can easily integrate it into a lucene app (i'll make
some experimentations with it soon)

----
 Sven

Le dimanche 8 mai 2005 � 18:26:14, vous �criviez :

AB> Hi All,
AB>   I'm wanting to do some range queries using latitude and longitude.

AB> I have numbers like so:

AB> long           lat    
AB> -84.65532   32.74212

AB> What would be the best way to store this in lucene so I can do a range query?

AB> Also for all you smart people out there do you know the
AB> distance between the decimal places?
AB> What I mean is if the long is constant what is the distance
AB> (miles, kilometers, feet etc) between

AB> 32.74213 - 32.74212   = .00001 = ?distance?
AB> 32.74222 - 32.74212   = .00010 = ?distance?

AB> Thanks,

AB> Andrew

AB> ---------------------------------------------------------------------
AB> To unsubscribe, e-mail: [hidden email]
AB> For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]