[GeoJSON] GeoJSON in OpenLayers

Sean Gillies sgillies at frii.com
Tue Mar 27 13:35:04 PDT 2007


Andrew Turner wrote:
> On 3/27/07, Martin Daly <Martin.Daly at cadcorp.com> wrote:
>> If GML terminology is the vogue, then geometry is itself a property of
>> the feature, and therefore this hierarchy is out of step.
>>
>> I also worry that trying to pick-and-choose from GML
>> terminology/structure might lead to confusion, and that it should be all
>> or nothing (within reason, and the "style" of JSON versus XML).  For
>> example, "featureCollection" could be used instead of "features".  Of
>> course the "all" option is only sensible if compatibility with GML is
>> seen as important.
> 
> This was what GeoRSS did in using a subset of GML that paralleled
> GeoRSS-Simple. So that for every Simple there was a corresponding GML.
> 
> However, now this may change b/c as users are pushing the boundaries
> of GeoRSS they want features that exist in GML, but aren't in the
> GeoRSS-GML. It looks like one solution will be to, in fact, allow
> any/all GML in a georss:where element.
> 
> So, by choosing all GML, you provide users both with power, but also
> possibly confusion/difficulty implementing publishers/parsers.
> 
> What about going the route that GeoRSS will be going now which is the
> GeoRSS-Simple (point, line, box, polygon) and then GeoRSS-GML (all
> GML). This allows for the 'gateway format' of the Simple for people to
> quickly put together and use, but then grow into the full GML and
> possibly just use existing GML creation/parsing tools.

The several flavors of GeoRSS cause needless confusion. Better for 
GeoJSON to allow for all the geometries.

Back to "properties" -- what I prefer about it is not that it's from 
GML, but that it avoids the awkwardness of an object attribute named 
"attributes". Of all the synonyms, "properties" seemed the best, partly 
because of our familiarity with GML.

"featureCollection", "featureMember", ... unnecessarily verbose, IMO. 
It's better done as

{"features": [{"id": "feature1", ...}, ...], ...}.

Cheers,
Sean

-- 
Sean Gillies
http://zcologia.com/news




More information about the GeoJSON mailing list