Subject: Re: [Geojson] [draft-geojson] Document best practice for polar bounding boxen (#47)

From: Dirk-Willem van Gulik <[email-masked]>
Date: Wed, 27 Jan 2016 10:24:17 +0100

On 27 Jan 2016, at 03:40, Martin Thomson <[email-masked]> wrote:
> 
> I think that as long as you can do this, we're fine:
> 
> function isInside(lng, lat, box
> ) {
> return lat >= box.min.lat && lat <= box.max.lat &&
>      lng  >= box.min.lng && lng <= box.max.lng
> ;
> }
> 
> That means that polar isn't interesting, the 180th meridian is the only problem. You could make this code more complex and insist on boxes having < 180 degrees of longitude, but that's tough.

I would make really clear (in normative) examples that you want:

		175 .. -175
v.s
		-175 .. 175

to mean either a 10 degree box over the ‘date’ line; or a 170 degree box with a small slice missing at the date line.

And perhaps clarify while you are on this that the lines of this bounding box are a pure 2D space _in_ the coordinate system of the geoid — i.e. for:

	box.min.lat = 30, box.max.lat = 10
	box.min.lon = 10, box.max.lat = 20

we are talking about the line where for every coordinate we have:

	t = 0 … 1
	lat(t) = 30 - t * 20
	lon(t) = 10 + t * 10;

and not things like the line of a ‘string’ hung between 30,10 .. 10,20 or the shortest distance in some other non flat 2D space.
	
Dw.