[OpenLayers-Users] Geojson input: why error on 3d points?

Peter Robins openlayers at peterrobins.co.uk
Thu Apr 30 04:34:23 EDT 2009


On Wednesday 29 Apr 2009, Christopher Schmidt wrote:
> On Wed, Apr 29, 2009 at 09:03:24AM +0100, Peter Robins wrote:
> > I've been having a bizarre problem where the same data (from
> > featureserver) has been displayed when in kml format, but not in geojson.
> > Delving into the code, I find this is because geojson.read throws an
> > error if there are more than 2 coords in a point. Why is this? 3d points
> > are perfectly valid in geojson, and it seems illogical that the 2 formats
> > should be handled differently.
>
> I believe, at the time, the logic was:
>  * OpenLayers can't do 3d
>  * If we read 3d, when we write it, we will write it wrong
>  * It is better to error at read time than fail silently at write time.
>
> I'd be willing to change this behavior, but it was originally
> implemented by tschaub, so I'd prefer his buy-in as well.

should I open a ticket and submit a patch removing this check?



More information about the Users mailing list