[GeoJSON] Aligning implementations

Chris Holmes cholmes at openplans.org
Sat Apr 7 10:07:27 PDT 2007


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

{
   'id': '1',
   'properties': {
     'title': u'Feature 1',
     'summary': u'The first feature',
     'link': http://example.org/features/1,
   }
   'geometry': {
     # WGS84 crs is implied
     'type': 'Point',
     'coordinates': [-105.8, 40.05],
   }
}

Or do we want geometry as just one of the properties:

{
   'id': '1',
   'title': u'Feature 1',
   'summary': u'The first feature',
   'link': http://example.org/features/1,
   'geometry': {
     # WGS84 crs is implied
     'type': 'Point',
     'coordinates': [-105.8, 40.05],
   }
}


Is there some javascripty advantage to putting geometry as a special 
property?  I suppose it makes it easier to get at the geometry, not 
having to dig in to the property array?

I think one potential issue with geometry as a top level property is 
what if you have a feature with more than one geometry?  This is 
certainly not that uncommon (though I concede it does break us out of 
'simple features'), like including the bounds with the geometry (which 
we could do with a special envelope property), or say a feature that has 
both the lot geometry and the building geometry.

Thoughts?  I'm fine with either, I just never heard explicit 
justification for the change to geometry on the top level.

Chris

-- 
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 282 bytes
Desc: not available
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20070407/e59d7f8f/attachment.vcf>


More information about the GeoJSON mailing list