[GeoJSON] RFC-2

Tim Schaub noreply at geocartic.com
Thu May 24 10:37:22 PDT 2007


Hey All-

Please review the updates to RFC-2 [1].

Martin Daly wrote:
> dodging crs definitions seems the wrong
> priority to me.  

Agreed.  Thanks for helping hash this out on #geojson.  I've made a few 
changes to the RFC-2 spec for consideration.

The idea is that GeoJSON allows you to represent the crs in any number 
of ways.  If a GeoJSON object doesn't have a crs member, then it 
means... nothing.  The spec says that clients may assume a Geographic 
projection, WGS84 datum, and units in decimal degrees.

The spec also says that if you have a crs member, it must look like:
"crs": {
     "type": string,
     "properties: object
}

[As a bonus, this adds no new vocab to GeoJSON.]

Furthermore, we give a suggestion that if you like to use EPSG codes, 
use the following convention:

"crs": {
     "type": "EPSG",
     "properties": {
         "code": 4326
     }
}

Now, I know people like to get crazy about what the letters EPSG mean 
with regard to axes order.  Fortunately, our spec is neither defined by 
the EPSG nor does it depend on anything defined by the EPSG.

Anyone developing a GeoJSON parser will be required to read the GeoJSON 
specification, which is unambiguous about axes order - point coordinate 
values are in x, y, z order (beyond that, we don't say).

All this means that if you come across GeoJSON that doesn't have a crs 
member, and you assume [y, x] order, you're going to get burned.  If you 
assume Geographic/WGS84/decimal degrees, you're likely to be right.

Also, if you assume that the coordinate values are ever in [y, x] order, 
you'll always be wrong (regardless of the crs type).  If you assume (or 
read the spec to learn) that the coordinate values are in [x, y] order, 
then you'll always be right.

>> - would it be terrible to have box be [[0.0, 0.0],[1.0,1.0]]? 
>> I like the feel of a box defined by min and max points, personally.
> 
> I agree.
> 

Boxes are back to arrays of two point coords.

Any other suggestions?  In particular, if anybody has any other 
suggestions for crs conventions, it would be good to hear them.

Tim




More information about the GeoJSON mailing list