findout centre of location from a set of long and lat

meenu
05-07-2008, 03:07 AM
dear all
can anybody help to find out center of point from a set of longitude and latitude.
i am using mapxtreme2005

let me describe my problem in detail...
from sql based on some condition in map i have set of points

eg:i have 4 points
1. long=58.23 lat=23.69
2. long=59.23 lat=21.69
3. long=60.23 lat=22.69
4. long=61.23 lat=25.69

from these points i want to findout the centre of the location...
i want to display this centre point as centre of the map....
can anybody help me for this
regards

Winwaed
05-07-2008, 08:31 AM
One approach is a simple mean. This will give you the centre of the points - but not necessarily the centre of the polygon defined by the points. This is because you might have a shape with lots of points on one side, but only a few on the other.

A simple mean is usually "good enough" unless you are near the poles, the International Date Line or high latitudes.

Richard

Wilfried
05-07-2008, 01:49 PM
Hi,

I completely agree with the reply of Richard. Maybe you can multiply long with Cos(Lat) to get closer in calculation, specially if you are at high latitudes.

 
Web mp2kmag.com
mapforums.com