Subject: [Geojson] Can position "extensions" be non-number values?

From: Sean Gillies <[email-masked]>
Date: Tue, 1 Dec 2015 17:49:42 -0700

In https://github.com/geojson/draft-geojson/issues/57 Erik Wilde asks if
the GeoJSON position array can be extended with non-number values, strings
in particular.

Currently our draft says this about positions (
https://github.com/geojson/draft-geojson/blob/master/middle.mkd#position):

> A position is represented by an array of numbers. There MUST be two or
> more elements. The first two elements will be longitude and latitude, or
> easting and northing, precisely in that order and using decimal numbers.
> Altitude or elevation MAY be included as an optional third element.
>
> Additional position elements MAY be included but MUST follow the three
> specified above and MAY be ignored by software. Interpretation and meaning
> of additional elements is beyond the scope of this specification.
>
My reading of this is that strings are not permitted.

Historically, the reason why it says "additional position elements MAY be
included" is because 8 years ago implementers were still thinking that
Polyline-M (where M is linear referencing measure) was an important
consideration. It's turned out not to be important at all. We'd be better
off today if we had said the position array was exactly 2 or 3 numbers.

Rather than expand this obsolete corner case into an extension point for
the GeoJSON format, I think we should close it up. If we cannot bring
ourselves to say that position arrays SHOULD contain no more than 3
numbers, let us at least explain that positions are not an extension point.

-- 
Sean Gillies