[GeoJSON] spec clarification of CRS

Tim Schaub tschaub at boundlessgeo.com
Thu Dec 12 15:45:21 PST 2013


On Thu, Dec 12, 2013 at 4:03 PM, Matt McClure <matthewlmcclure at gmail.com> wrote:
> On Thu, Dec 12, 2013 at 5:01 PM, Martin Daly <Martin.Daly at cadcorp.com>
> wrote:
>>
>> Once again, all that GeoJSON says is that the encoding of coordinates is
>> *always* easting/longitude followed by northing/latitude. GeoJSON does not
>> say that CRS-s that do not use this order are disallowed, only that encoding
>> coordinates in other orders is disallowed.
>>
>> Interpreting the enforced coordinate order as meaning that some CRS-s are
>> therefore disallowed appears to be your, and OGC-s, interpretation; but that
>> interpretation is simply wrong.
>
>
> I don't follow. Given a CRS that specifies (y, x) order, how should one use
> it in a GeoJSON representation, and how should a client interpret the data
> in that GeoJSON representation? An example would help.

You would serialize it as [x, y].  End of story.

Here is an example (assuming your CRS is identified by the string "foo"):

  {
    "type": "Point",
    "coordinates": [1, 2]
    "crs": {
      "type": "name",
      "properties": {
        "name": "foo"
      }
    }
  }

The example above is a GeoJSON serialization of a point whose "x"
value is 1 and "y" value is 2.


>
> --
> Matt McClure
> http://matthewlmcclure.com
> http://www.mapmyfitness.com/profile/matthewlmcclure



-- 
Tim Schaub
Vice President, Engineering | Boundless
tschaub at boundlessgeo.com
@tschaub



More information about the GeoJSON mailing list