[Geojson] polygon point order
Paul Ramsey
pramsey at refractions.net
Fri Oct 12 14:52:58 PDT 2007
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
More information about the GeoJSON
mailing list