1. Home
  2. Our Blog
  3. GeoJSON format and troubles with coordinate reference system

GeoJSON format and troubles with coordinate reference system

The GeoJSON format is widely used for a long time in many applications and software. Unfortunately (or maybe “fortunately” for someone) the GeoJSON specification has changed few years ago and there is no backward compatibility relating the coordinate reference system definition – so it makes some GeoJSON data using old specification unusable in some software strictly requiring the new GeoJSON specification. This article summarizes the key GeoJSON specification change in connection with coordinate system definition.

Current state

The new GeoJSON specification RFC 7946 (dated 2015) says that the coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84. It is not required to specify the coordinate reference system by a “crs” member in the GeoJSON structure.

How was it before?

With the GeoJSON specification dated 2008 an object without a member named “crs” contains geometries in a geographic coordinate reference system, using the WGS84 datum, and with units in decimal degrees. But if a GeoJSON object has a member named “crs”, it is assumed to represent the coordinate reference system of the included geometry or geometries – for example:
"crs": {"type": "name", "properties": {"name": "urn:ogc:def:crs:EPSG::3857"}}

Troubles caused by the specification change

Some software was intended to work with specified coordinate reference systems and produces GeoJSON outputs using old specification having “crs” members, using various coordinate systems definitions. Unfortunately, another software using the new GeoJSON specification doesn’t work with GeoJSON data having different “crs” than WGS84 (according to old specification).

Conclusion

Although various software allows to export GeoJSON data using various coordinate systems, it is crucial to select WGS84 as output coordinate system to ensure compatibility with the new GeoJSON specification. Alternatively (if you already have data using the old specification) you can transform the GeoJSON data from any coordinate system to the WGS84 coordinate system – for example by MyGeodata Converter. For compatibility reasons the MyGeodata Converter allows to select any coordinate system when converting to GeoJSON format.
So if the input data to the Converter is in a coordinate system different than WGS84, the Converter will offer this original coordinate system also for output data by default. However, if you want the output data to be consistent with the new GeoJSON specification, it is important to check before the conversion that the output coordinate system is WGS84.

Updated on March 25, 2024

Was this article helpful?

Close Bitnami banner
Bitnami