[GeoJSON] Features with "unexpected" properties

Jeff Yutzler jeffy at imagemattersllc.com
Thu Sep 15 19:41:36 PDT 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20160915/92eef17a/attachment.htm>


More information about the GeoJSON mailing list