Re: Trying to find a coverage rectangle given a number of latitude/longitudes



In article <pan.2006.08.15.12.04.42.983034@xxxxxxxxxxxx>,
Duncan Muirhead <noone@xxxxxxxxxxxx> wrote:

On Tue, 15 Aug 2006 05:15:06 -0400, Alex wrote:

hi,

if been stuck with this for a while now. I'm trying to create a rectangle
with 4 coordinates for the corners. I have a list of coordinates
representing points on a map, and I want to see how big the whole set of
points is on the map.

All the coordinates are in decimal and multiplied by 100,000 ie. a set of
lat/long (485130 5228170). To find the points I tried to see which was
bigger/smaller, but that doesn't seem to work, as i'm getting positions
that are close together, instead of the absolute corners. So what I want to
find is the points (northwest, northeast, southwest, southeast).

What is a good way to approach this problem?

Any help is appreciated.
If minLat is the minimum, and maxLat the maximum, of the latitudes,
and analogously for minLon and maxLon then the points
northwest = maxLat, minLon
northeast = maxLat, maxLon
southeast = minLat, maxLon
southwest = minLat, minLon
are the corners of a rectangle that contains all the points

Duncan


It's not nearly so simple. There's the problem of wrap-around. The earth
is a sphere, not a flat *** of paper. There is no way to partition the
problem so that min-max is guaranteed to work. Consider even the very
simple notion of a triangle with the north-pole somewhere toward the
center. What exactly would you like to have happen here? And how do you
decide what's "inside" and what's "outside"?

I don't think the problem is well-formed.

Regards,
-- daan
.


Quantcast