[OSM-newbies] Standard gps bounds notation?
Bill Ricker
bill.n1vux at gmail.com
Sun Feb 7 03:44:47 GMT 2010
On Sat, Feb 6, 2010 at 9:37 PM, Donald Campbell II
<donaciano2000 at gmail.com> wrote:
> at1 lat2 lon1 lon2
> but perhaps
> lat1 lon1 lat2 lon2
> is preferred?
frequently. that is both a list of two corner points or a tour around
the four sides.
> Or...
> lon1 lat1 lon2 lat2?
those who rigidly think x y sometimes prefer that
> Maybe there's 2 or 3 common orderings and they have specific names so you
> know which you're dealing with?
i haven't run across names either.
> Also, as it stands I'm only using a rectangular bounds since it's easy to
> check if a point is inside it with a simple lat1 <= newpoint <= lat2
well, pseudo rectangles in spherical coordinates.
luckily the longitude wrap-around occurs mostly in wet territory so
you won't often if ever want to include lon +-180 or either pole
inside your box.
> but I should really use a better way of checking so that skewed boxes or
> arbitrary shapes could be used. Does anyone know where I could find an
> example of how to do that? There's probably a library that does this
> already somewhere.
Only worth doing if you get a library, as doing this right and fast is
non-trivial.
Much skull sweat expended in 20thC computer graphics and mapping
research to get it right. The Graphics Gems series of books contains
much of this knowledge.
http://www.indiebound.org/book/9780122861666
But a mapping code library will convey this received wisdom more efficiently.
--
Bill
n1vux at arrl.net bill.n1vux at gmail.com
More information about the newbies
mailing list