[Geojson] Features without geometry

Tim Schaub tschaub at openplans.org
Wed Sep 19 10:11:36 PDT 2007


Stephen Battey wrote:
> I'm looking into integrating GeoJSON into our web mapping application to 
> replace the JSON data structure we currently use, which does not follow 
> any standards.
> One problem I foresee in adopting GeoJSON is there is no option to omit 
> geometry from features. The GeoJSON spec states:
>     3-4-1  A feature object must have a member with the name "geometry".
> However, there are instances where we would like to transfer feature 
> information without defining the geometry of those features, which would 
> just add extra overhead.
>  
> For example, our client application has a "get info" tool, where the 
> client will request information for features at or near a point or 
> region. The response from the server is a set of features but for the 
> purposes of this action the geometries of the features is irrelevant. 
> The client application just wants to retrieve the properties of the 
> features and display them to the end user.
> Our mapping application currently allows the client to specify in the 
> request whether they would like geometry information included in the 
> response. Historically, this is because we originally used GML, so 
> having geometry in the response made the response roughly 110% larger 
> than without. Although GeoJSON will be significantly smaller than GML 
> the same logic still applies - the response is roughly 70% larger with 
> geometry than without.
>  
> Does it make sense to omit the geometry member in GeoJSON? Should 
> geometry be treated as just another piece of information or is it more 
> fundamental to the definition of a feature?
> Conversely, does it make sense for a GeoJSON parser to throw out data as 
> invalid GeoJSON simply because the geometry information is missing when 
> all other aspects of the GeoJSON structure are correct - so the 
> parser could continue parsing, having set the geometry attribute to null 
> or left undefined?
>  

Geometries are really the heart of GeoJSON.  The spec says that a 
feature "represents a geometry with additional properties."

Features are really pretty weak in GeoJSON.  The properties object of a 
feature can be anything you want.  So, without the geometry, a feature 
doesn't really have any structure.

In my mind, if you omit the geometry from GeoJSON, you're just back to 
JSON.  Can you describe what you'd get out of switching to GeoJSON if 
you weren't representing spatial data?

Tim

> Steve
> 
> __________________________________________________
> 
> *Stephen Battey*
> *Software Engineer, Development Team,  Dotted Eyes Ltd*
> __________________________________________________
> 
> Dotted Eyes  +44 (0)1527 556920
> Hanbury Court,  Harris Business Park,
> Stoke Prior,  Bromsgrove  B60 4JJ,  UK
> 
> *Location.  Precision.  Vision.    *www.dottedeyes.com 
> <http://www.dottedeyes.com/>*
> 
> *ResponseMX dynamic web maps: www.dottedeyes.com/rmx 
> <http://www.dottedeyes.com/rmx>
> Ready-to-use digital maps & data: www.dottedeyes.com/digital 
> <http://www.dottedeyes.com/digital>
> 
> This email may contain confidential information, not to be disclosed.
> Contents are personal and not necessarily the views of Dotted Eyes.
> Emails and attachments may be monitored without notice in advance.
> 
>  
> 
> Email has been scanned for viruses and spam by Altman Technologies 
> <http://www.altman.co.uk/emailsystems>
> 
> !DSPAM:4033,46f0eabc271862143011171!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Geojson mailing list
> Geojson at lists.geojson.org
> http://lists.geojson.org/listinfo.cgi/geojson-geojson.org
> 
> 
> !DSPAM:4033,46f0eabc271862143011171!




More information about the GeoJSON mailing list