[GeoJSON] Point as list of one point, or list of coords

Christopher Schmidt crschmidt at metacarta.com
Wed Apr 11 06:07:53 PDT 2007


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,
-- 
Christopher Schmidt
MetaCarta



More information about the GeoJSON mailing list