[Geojson] Solution for collection and member "type"
Christopher Schmidt
crschmidt at metacarta.com
Thu Aug 2 14:45:47 PDT 2007
On Thu, Aug 02, 2007 at 12:52:03PM -0600, Sean Gillies wrote:
> Features and FeatureCollections do not need a "type" member. Instances
> of these objects can be differentiated from objects of other kinds
> (including Geometries) entirely by
>
> A) context: Geometries are contained by Features which are contained by
> FeatureCollections;
> B) or by inspection: Features have a "geometry" member,
> FeatureCollections do not.
I do not like this. The reason to have type is simply to avoid this
neccesity for context. Take the type value from the object, and dispatch
to a function of the same name. I agree with your evaluation -- I just
disagree with the conclusion that 'inference is good enough'.
> Applications may opt to add "type" members to objects for convenience,
> but it should not be mandatory. Comments?
I agree with some conversation on the IRC channel that it should be all
or nothing, as far as the spec is concerned. I just think it should be
all.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the GeoJSON
mailing list