[Geojson] polygon point order

Andrew Turner ajturner at highearthorbit.com
Fri Oct 12 17:46:32 PDT 2007


I think there should be a preferred, and/or assumed ordering. I don't
like all this disfavoring of "global" trajectories and polygons.

my suggestion is "clockwise", "west to east"

so [100,0], [-90,0] is over the dateline
     [-90,0], [100,0] is over the prime-meridian


to illustrate a complicate case:
[-90, 0,], [100,0], [-90,-10] is west-hemisphere, east-hemisphere,
southwest-hemisphere, in that order.


On 10/12/07, Paul Ramsey <pramsey at refractions.net> wrote:
> The same thing applies to linestrings...
>
> Does ( [100,0], [-90,0] ) to over the dateline or over greenwich?
>
> I think the "law of the minimum" is a workable compromise, which says to
> 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.
>
> P.
>
> Keith Jenkins wrote:
> > Thanks to everyone for all the work going into the GeoJSON draft.
> > I've only now read it through in its entirety, and have a question
> > about polygon point order.  (this is different from the
> > recently-discussed lon/lat order)
> >
> > Q: Should the point order of polygons be specified to be either
> > clockwise or counterclockwise?
> >
> > Without a defined direction, a polygon like [ [-90,0], [90,0],
> > [90,20], [-90,20], [-90, 0] ] is ambiguous -- it could cross either
> > the Atlantic or the Pacific.
> >
> > Some confounding issues:
> > * Some client interfaces scroll across longitude 180, but others don't.
> > * A user might define a new polygon in either direction (although the
> > client could reverse the sequence as necessary before sending to the
> > server).
> > * Most polygons are not anywhere near 180 degrees wide, so a client
> > could safely assume the smaller of the two options in most cases.
> >
> > I had a similar question about the point order for bounding boxes that
> > cross longitude 180, but it sounds like the box is being dropped from
> > GeoJSON.
> >
> > Keith
> >
> > p.s. I didn't find any prior discussion on the list archive, so
> > forgive me if this has already been hashed out.
> > _______________________________________________
> > Geojson mailing list
> > Geojson at lists.geojson.org
> > http://lists.geojson.org/listinfo.cgi/geojson-geojson.org
>
>
> --
>
>    Paul Ramsey
>    Refractions Research
>    http://www.refractions.net
>    pramsey at refractions.net
>    Phone: 250-383-3022
>    Cell: 250-885-0632
> _______________________________________________
> Geojson mailing list
> Geojson at lists.geojson.org
> http://lists.geojson.org/listinfo.cgi/geojson-geojson.org
>


-- 
Andrew Turner
ajturner at highearthorbit.com      42.2774N x 83.7611W
http://highearthorbit.com              Ann Arbor, Michigan, USA
Introduction to Neogeography - http://oreilly.com/catalog/neogeography



More information about the GeoJSON mailing list