[GeoJSON] RFC-001 vote
Tim Schaub
noreply at geocartic.com
Wed May 23 17:04:46 PDT 2007
Hey-
Allan Doyle wrote:
> VOTE HERE: http://www.yourfreepoll.com/wzdbtaousp.html
Thanks for keeping this going. I like GeoJSON. However, I voted
against RFC-001. As was suggested, I'm posting my arguments to the list.
The changes I'd like to see are reflected here:
http://wiki.geojson.org/RFC-2
This proposal describes the structure for four classes of GeoJSON
objects: Geometry, GeometryCollection, Feature, and FeatureCollection.
The Geometry types described are Point, LineString, Polygon, MultiPoint,
MultiLineString, MultiPolygon, and Box.
In my mind, this proposal keeps GeoJSON simpler. There are a total of 4
required names in the GeoJSON vocabulary: type, coordinates, members,
and properties. With these four names, the above objects can be
described concisely - balancing human and machine readability. (I like
"data" or "coords" better than "coordinates" but that's just because
they have fewer letters.)
I've left the crs definition vague, since I care less about how that is
handled.
The changes between RFC-001 and RFC-2 are summarized as: define what
types of objects may be serializes as GeoJSON, get rid of the point as
array of a single array business, get rid of the box as an array of two
points business, get rid of the holes name, make all multi-part
geometries more similar, and make all GeoJSON objects have a type.
I've updated the OpenLayers GeoJSON parser to read and write according
to RFC-2.
You can paste the examples from the wiki into the parser to see what
they look like rendered.
Examples: http://wiki.geojson.org/RFC-2#Examples
Parser:
http://dev.openlayers.org/sandbox/tschaub/geojson/examples/geojson.html
Interested to hear any feedback.
Tim
A few notes:
- I'm sure there are typos.
- Though the OL example spits out only Feature type GeoJSON, it can
read/write all types.
- A Box gets read in as a polygon in OL - so you don't get the same
GeoJSON on the way out.
- If you get the "Bad GeoJSON" response, hit F12 or Ctrl-Shift-L to see
a (potentially) more useful error message.
More information about the GeoJSON
mailing list