Hi!
Can i use MySQL spatial functions directly, to compute distance
between two GPS coordinate pairs in WGS84 format?
Thank you!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql
010 at 11:12 PM, dan wrote:
>>>> >> >>>
>>>> >> >>>>
>>>> >> >>>> Can any one help me with understanding the mysql spatial
>>>> >> >>>> functions?
>>>> >> I
>>>
>>> >> >>> On Sat, May 1, 2010 at 11:12 PM, dan wrote:
>>> >> >>>
>>> >> >>>>
>>> >> >>>> Can any one help me with understanding the mysql spatial
>>> >> >>>> func
t;> wrote:
>> >> > Dan,
>> >> >
>> >> > I think you are trying to create a polygon based on the values in
>> >> > other columns in the same row. I think these other columns are
>> >> > named
>> >>
on the values in
>> >> > other columns in the same row. I think these other columns are
>> >> > named
>> >> > `n` and so on.
>> >> >
>> >> > Your mistake is that you are creating a text string,
>> >> > &q
inside it. That won't work. Those column
>> > names are just part of a string. They are not literal values that the
>> > POLYGON() function can interpret. You will need to use CONCAT() or
>> > similar to build a string that POLYGON() can interpret.
>>
n` `w`, `n` `e`)');
>>
>> but my poly column just reports back NULL.
>>
>> the n, e, s & w columns are decimal lat / long data.
>>
>> Dan
>>
>> On Sun, 2 May 2010 06:43:13 -0700, Ted Yu wrote:
>>> I think you may have seen this
/ long data.
>
> Dan
>
> On Sun, 2 May 2010 06:43:13 -0700, Ted Yu wrote:
>> I think you may have seen this:
>> http://dev.mysql.com/doc/refman/5.0/en/relations-on-geometry-mbr.html
>>
>> On Sat, May 1, 2010 at 11:12 PM, dan wrote:
>>
>>>
>
mal lat / long data.
Dan
On Sun, 2 May 2010 06:43:13 -0700, Ted Yu wrote:
> I think you may have seen this:
> http://dev.mysql.com/doc/refman/5.0/en/relations-on-geometry-mbr.html
>
> On Sat, May 1, 2010 at 11:12 PM, dan wrote:
>
>>
>> Can any one hel
Can any one help me with understanding the mysql spatial functions? I can
only seem to find bits and pieces of how-to's etc.
I have an existing table of lat / long data representing unique boundaries
i.e. rectangles and I want to search the table to find the rectangle that
bou
Thanks! That really seems to do the trick. Amazing. Now, for some
stupid questions: The values 69.1 and 57.3... are you aware of some
documentation or tutorial explaining these values and the math? I'd
like to understand why it works.
Also, I would like to figure out how to, if possible, speed th
haven't followed the complete thread so i don't know what you're
after, but maybe this helps?
SELECT latitude, longitude, SQRT( POW( 69.1 * ( latitude - [startlat]
) , 2 ) + POW( 69.1 * ( [startlng] - longitude ) * COS( latitude /
57.3 ) , 2 ) ) AS distance FROM foobar ORDER BY distance ASC
wher
Thanks for the reply... It returns results, but not exactly what I am
hoping for--basically, I get the nearest latitudes (but not near
longitude), and nearest longitude (but not near latitudes). In other
words, it doesn't return the closest lat/lng pair... Also, the query
takes about 8 seco
13 matches
Mail list logo