[GeoJSON] Features with "unexpected" properties

Martin Daly Martin.Daly at cadcorp.com
Sat Sep 17 03:16:05 PDT 2016


If you think that that is bad, try loading GeoJSON (or GML, or TAB files, etc) with mixed geometry types…

Depending on your point of view, the relational and/or single geometry type model common in many (but not all, I hasten to add) geospatial applications/libraries is either a design decision, or a limitation.

How these applications/libraries handle the situation with GeoJSON is really up to them (as it is with other exchange data sources that don’t match their internal data model). I’m not sure that anyone will be able to convince them otherwise.

Martin


From: GeoJSON [mailto:geojson-bounces at lists.geojson.org] On Behalf Of Jeff Yutzler
Sent: 16 September 2016 03:42
To: geojson at lists.geojson.org
Subject: [GeoJSON] Features with "unexpected" properties

List,
One of the things I appreciated about GeoJSON early on is that it is not rigid when it comes to properties in the features in a feature collection. The very first example in the spec shows different properties in different features. I have been able to take advantage of this design decision to simplify my own code and to avoid brittle feature schemas.

I am finding that other code bases do not react well to this technique. It appears the way they work is that the first feature in a feature collection is used as a template. If any properties appear in subsequent features that are not in the template, the operation may fail. To work around these failures, I find myself doing immoral things to the features[1].

While I don't expect any normative changes in the specification, I would like to know more about the expected behavior when applications see unexpected properties. If it were up to me, I would expect applications to accept any valid GeoJSON gracefully. However, I am willing to be convinced otherwise.

Thanks,
Jeff

[1] https://github.com/venicegeo/geojson-go/commit/d2c793d8209686951cc87f80c1c0aba5d64dfef9
--
Jeff Yutzler
Image Matters LLC<http://www.imagemattersllc.com/>
Mobile: (703) 981-8753<tel:%28703%29%20981-8753>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20160917/38cbb867/attachment.htm>


More information about the GeoJSON mailing list