I am getting the distance between two points, I have the coordinates of the points(longitude and latitude), and SRS is 4326. But I dont know how to calculate.
I am getting the distance between two points, I have the coordinates of
the points(longitude and latitude), and SRS is 4326. But I dont know how
to calculate.
Who can give me some helps? Thanks a lot!
Well, Geoserver does not do that. Geotools has the GeodeticCalculator
that has been designed to do this very job.
Thought, if you want a simple solution just for 4326, you may want
to google for "great circle distance", if I remember properly there
are simple expressions for that.
hmm, I'm not a projection expert but I can give you some hints.
4326 (lat/long) is measured in degrees. So distance is meaningless
there. You will have to reproject your data into a projection that has
an equal scale I think, maybe equal area. I can't remember. This page
will teach you a bit about it: http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html
Brent Owens
(The Open Planning Project)
ÓÆ ÄÝ wrote:
Hello everyone!
I am getting the distance between two points, I have the coordinates
of the points(longitude and latitude), and SRS is 4326. But I dont
know how to calculate.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------
hmm, I'm not a projection expert but I can give you some hints.
4326 (lat/long) is measured in degrees. So distance is meaningless
there. You will have to reproject your data into a projection that has
an equal scale I think, maybe equal area. I can't remember. This page
will teach you a bit about it: http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html
Brent, reprojection usually means distance distortion too.
There are equations to compute the real distance given lat/lon
of the two points. For example the great circle distance
(http://en.wikipedia.org/wiki/Great-circle_distance) is one, that
assumes earth is spherical, and guardantees at most 0.5% error,
usually better than distance computed on projected maps,
especially if the points are far apart.
I have validated the veracity of the distance result through comparing with the result of GoogleEarth. I think this page is worth being recommended.
Regards,
Youni
From: Andrea Aime <aaime@anonymised.com>
To: Brent Owens <brentowens@anonymised.com>
CC: ÓÆ ÄÝ <youni_9@anonymised.com>, geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] How to get the distance between two points
Date: Tue, 21 Nov 2006 17:27:04 +0100
Brent Owens ha scritto:
> hmm, I'm not a projection expert but I can give you some hints.
> 4326 (lat/long) is measured in degrees. So distance is meaningless
> there. You will have to reproject your data into a projection that has
> an equal scale I think, maybe equal area. I can't remember. This page
> will teach you a bit about it:
> http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html
Brent, reprojection usually means distance distortion too.
There are equations to compute the real distance given lat/lon
of the two points. For example the great circle distance
(http://en.wikipedia.org/wiki/Great-circle_distance) is one, that
assumes earth is spherical, and guardantees at most 0.5% error,
usually better than distance computed on projected maps,
especially if the points are far apart.