+dbased Posted May 11, 2007 Share Posted May 11, 2007 Let's say I have a bunch of GPS locations and I want to find the GPS center of them all. Anyone have an algorithm to do this or application that just does it? I know I could use GSAK and experiment with center locations and see how far away things are, but I was hoping for something more precise. I have a whole breadth of development tools (Pascal, C#, C++, Java and PHP) at my immediate disposal, so I lots of choices. Quote Link to comment
+Markwell Posted May 11, 2007 Share Posted May 11, 2007 By center, would you mean average or center as in something that's within the polygon created by the external points? I'm confused as to a "GPS Center" of a shape like this: Now you COULD take all of the coordinates and covert them to decimal degrees and average the latitudes and average the longitudes. That would give you an "average" point, but is that the "GPS Center" you're talking about? Quote Link to comment
+Stunod Posted May 11, 2007 Share Posted May 11, 2007 You could average the decimal degrees as Markwell suggested, but Fizzymagic will correctly inform you that this isn't the "center" (due to the earth not being flat). Fizzy's program FindStats can find the "center" of your ALL FINDS pq. Quote Link to comment
+Desert Trekker Posted May 13, 2007 Share Posted May 13, 2007 If you want to do your own calculations then use the UTM coordinates for the locations rather than lattitude & longitude. One of the benefits of the UTM system is that it readily lends itself to trig calculations. Lat & long does not. Quote Link to comment
+trainlove Posted May 14, 2007 Share Posted May 14, 2007 If you want to do your own calculations then use the UTM coordinates for the locations rather than lattitude & longitude. One of the benefits of the UTM system is that it readily lends itself to trig calculations. Lat & long does not. But of course all of the points of interest would have to be in the same UTM Zone. I live right on the edge of Zone 19 so half of the caches I've done are in 18 and half in 19. My workaround was to geo-average each zone then go back to Lat/Long with the 2 averages and find the weighted average of thet, I.E. 555 caches in 18 and 666 caches in 19 are something like 555/(555+666)*(lat/long) + 666/(555+666)*(lat/long) is the approximate true center of all the caches. But that's only approximate. One could convert ALL cache locations to x,y,z in 3 dimensions and average those and then ignore z and project the point on the Earth's surface that's above the true average. It should be close to the approximation given above. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.