[GeoJSON] Point as list of one point, or list of coords
Sean Gillies
sgillies at frii.com
Thu Apr 12 06:43:12 PDT 2007
Christopher Schmidt wrote:
> Two different representations are possible for point:
>
> [x,y]
>
> [[x,y]]
>
> The former possibly makes more sense, but the latter means that any
> geometry type can be transformed like so:
>
> coords = " ".join(map(lambda x: ",".join(map(str, x)),
> geometry['coordinates']))
>
> Note that this also supports 3/4 d geometries.
>
> I'm strongly in favor of the latter, speaking as an implementor.
>
> Regards,
Then we'd have uniformity across points, line strings, and rings, but do
we want to unify with polygons as well and make everything an array of
arrays of arrays? That would begin to get awkward.
Sean
More information about the GeoJSON
mailing list