Search Postgresql Archives

distance calculation usng lat and long in miles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the lat and long data. I have created the geom column based on the lat and long data as below.


    UPDATE property SET geom =GeometryFromText('POINT(' || long ||
    ' ' || lat || ')',4326);

Now I have the geom columns in two tables

I am calculating the distance as below

select distance(geom1, geom2)* 69.055


It seems to be right. But I want to make sure.

Thanks for help in advance.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux