[Geojson] polygon point order
Christopher Schmidt
crschmidt at metacarta.com
Mon Oct 15 06:51:34 PDT 2007
On Mon, Oct 15, 2007 at 02:41:35PM +0100, Martin Daly wrote:
> > Two possibilities mentioned so far:
> >
> > A. "Law of the minimum" =
> > > always take the smaller interpretation (the one < 180 degrees wide).
> In
> > > exchange for that maximum size interpretation, you can ignore
> ordering,
> > > and the rule works for any line, not just closed polygons, the way
> > > clockwise/anti-clockwise does.
> >
> > B. "Clockwise, west-to-east"
> >
> > Simplicity seems to favor A. Are there any cases where A would fail?
> > (If a user really wants a 181-degree line, then maybe the client could
> > insert a vertex mid-way.)
>
> Or C. "Law of the spheroid"
>
> Allow coordinates/angles <-180 and >180.
This is what OpenLayers does, for the most part. (With the non-default
date-line wrapping, it does A, I think, if I understand, but vectors
are not well supported in that case.) It also means you're not special
casing your geometry description language for a specific
projection (unprojected lat/lon).
> Or D. "Law of the jungle"
>
> Do nothing.
>
> I like D. I'm queasy about being the first to come up with a rule to
> follow.
Also throwing in my hat for D, in case it wasn't clear from what I said
earlier :) Though Since C implies "Don't add any limits on the bounding
box for features" -- and there currently isn't one in the spec -- I
think that D/C are both 'current state'.
Someone else said at one point "If you're worrying about date-line
wrapping, you're using the wrong projection." I don't know if I 100%
agree, but I think that it's something to consider.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the GeoJSON
mailing list