[GeoJSON] Aligning implementations
sgillies at frii.com
Mon Apr 9 13:03:19 PDT 2007
Tim Schaub wrote:
> Chris Holmes wrote:
>> Ok, I'd like to take a shot at lining up the proto-implementations and
>> perhaps putting some words down on the wiki.
>> The big open question for me right now is if geometry is a top level
>> property, as in OpenLayers/PCL at the moment
>> Or do we want geometry as just one of the properties:
> My thinking:
> What does every feature have? Some way to be identified (id), some
> geometry (geometry), and a bunch of other attributes (properties).
> Can you have a feature without geometry? No, that's silly.
> Can you have a feature without a title? Of course. We're talking about
> the JSON representation of geographic features, not documents.
> Ok, I know that's a bit narrow, but continuing in that same vein - if
> I'm writing an application that reads GeoJSON, I'm going to make it
> break if a feature comes in without a geometry. If a feature comes in
> without a title or a link, I'll continue on without flinching. That
> suggests to me that geometry and title don't belong in the same place
> (both under properties).
> Of course, all of this only becomes a rule if enough people think in the
> same way.
> Are things like envelopes and links fundamental components of a
> geographic feature for others? Obviously, I see utility in more than
> what I've proposed - but I think it makes sense to sort out requirements
> before getting into options.
If you look closely, I'm no longer proposing that titles and links be
top-level attributes. I agree with you about a top-level geometry too,
but was toying with the idea that an envelope might serve a dual purpose.
More information about the geojson