You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Point,MultiPoint,LineString, etc. are all \GeoJson\Geometry objects, e.g. \GeoJson\Geometry\Point. This follows spec.
Feature and FeatureCollection are both in the \GeoJson\Feature hierarchy -- \GeoJson\Feature\FeatureCollection and \GeoJson\Feature\Feature. I think this is out of spec. The Feature and FeatureCollection classes do not extend a common Feature class -- FeatureCollection has no properties in common with Feature.
The text was updated successfully, but these errors were encountered:
The namespaces are just there to separate classes into logical packages and aren't meant to enforce a class hierarchy (although it is often consistent with one). I could have put both collection classes in a GeoJson\Collection namespace, but I thought it was more intuitive to have all of the geometry or feature-related classes in one place.
The Feature and FeatureCollection classes do not extend a common Feature class
The collection classes shouldn't extend their non-collection counterparts, as they are only GeoJson objects (outlined in the spec). I'm not sure if your comment was motivated by the GeometryCollection's class hierarchy, but the fact that it extends Geometry instead of GeoJson is actually a bug. I'm tracking that in #13.
Point
,MultiPoint
,LineString
, etc. are all\GeoJson\Geometry
objects, e.g.\GeoJson\Geometry\Point
. This follows spec.Feature
andFeatureCollection
are both in the\GeoJson\Feature
hierarchy --\GeoJson\Feature\FeatureCollection
and\GeoJson\Feature\Feature
. I think this is out of spec. TheFeature
andFeatureCollection
classes do not extend a commonFeature
class --FeatureCollection
has no properties in common withFeature
.The text was updated successfully, but these errors were encountered: