[GeoJSON] Aligning implementations

Chris Holmes cholmes at openplans.org
Mon Apr 9 18:55:04 PDT 2007

Tim Schaub wrote:
> Chris Holmes wrote:
>> I definitely have a set of users who want to be able to serve up data 
>> even if it doesn't have a geometry.
> Ok, I still like
>      geometry: {
>          type: null,
>          data: []
>      }
> better than
>      geometry: null
> or no sign of geometry at all.
>> [multiple geometries]
>> what do I do?  
> Not that hard to say that the data structure should be (for each feature):
> {
>      id: string,
>      geometry: array,
>      properties: object
> }
> Though I wonder if people would complain about having to do geometry[0] 
> (or equivalent) most of the time.

Yeah, I don't really like that so much.  If you have multiple geometries 
people will probably want names for them.  Ie which one's the building 
and which one's the lot.  If you just have an array you don't know which 
is which.

I'm more inclined to just allow geometry objects to also be embedded as 
one or more of the properties.

> You got me curious about all these people who want to serve up 
> geographic features with no geometry.  I wonder if you just mean null or 
> broken geometry - or if there really is a world where people deal in 
> geography without geometry.
I mostly mean null or broken geometries.  But I've also got people who 
are using a WFS to expose their data.  They may have a bunch of tables, 
say a bunch of samples of rocks and the time they were taken, that are 
linked to a specific location.  They do a join on the data and present 
the result, each location has zero or more data samples.  Now presenting 
this obviously has a location, and can go through WMS and WFS.

So they've already exposed their data.  But if they want to just expose 
their data samples table, then it's easy as pie if they've already got a 
WFS configured for their other data.  They just turn it on, and it's 
able to spit out XML, and if we do this, then JSON as well, through the 
WFS protocol.  And indeed eventually I may even try for a more RESTful 
feature service that exposes GeoJSON.  If organizations have it set up 
for their geospatial data, then they can easily turn it on for other 
data.  I think it's great if WMS/WFS is the way in to organizations 
exposing their data to the web.  And yes, I realize that it then won't 
be GeoJSON, and then we just wouldn't include a geometry.  But if you 
have an application that doesn't necessarily use the geospatial part of 
the geojson data it's working against then it could benefit from this.


> Tim
> _______________________________________________
> geojson mailing list
> geojson at lists.geojson.org
> http://lists.geojson.org/listinfo.cgi/geojson-geojson.org

Chris Holmes
The Open Planning Project
-------------- 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/20070409/5eab2538/attachment.vcf>

More information about the GeoJSON mailing list