[Geojson] polygon point order
Keith Jenkins
kgj2 at cornell.edu
Fri Oct 12 12:26:50 PDT 2007
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.
More information about the GeoJSON
mailing list