[GeoJSON] New, improved polygons
Allan Doyle
adoyle at eogeo.org
Tue Apr 24 19:09:17 PDT 2007
Sean, Jason, and I came up with a new, improved polygon:
"geometry": {
"type": "Polygon",
"crs": "EPSG:4326",
"coordinates": [[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]],
"holes":[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],
[0.25,0.25]]
}
Where "holes" is optional.
The idea is that this way, Point, LineString, Polygon, Box, and
MultiPoint all have very similar structures.
The question came up about why split holes from coordinates, why not
make Polygon coordinates be an array of rings. My answer is that if
we keep it like this, then coordinates are always arrays of arrays
(i.e. arrays of points).
Any objections? I'll toss this into RFC-001...
Allan
--
Allan Doyle
+1.781.433.2695
adoyle at eogeo.org
More information about the GeoJSON
mailing list