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

Peter Robins openlayers at peterrobins.co.uk
Fri May 1 04:49:42 EDT 2009


On Thursday 30 Apr 2009, Christopher Schmidt wrote:
> On Thu, Apr 30, 2009 at 09:34:23AM +0100, Peter Robins wrote:
> > 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?
>
> Yes, please do. It lets us keep a record, either way.

http://trac.openlayers.org/ticket/2070
It would be nice if this could be included in 2.8, as it doesn't affect 
anything else, so doesn't need extensive testing.



More information about the Users mailing list