Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | c60685c4e86d0994b6066e85e481afd1d22a3e8d |
---|---|
Page Name: | Supporting GeoJSON |
Date: | 2019-01-21 10:16:57 |
Original User: | sandro |
Next | 680b5f8ea26cfdade55a6f7b3a693aebaf735957 |
Content
Introduction
GeoJSON is an open standard data format based on JSON (JavaScript Object Notation), a very popular data format widely adopted by many web-apps as a replacement for XML.The specific scope of GeoJSON is extending the basic capabilities of JSON so to adequately support geographic features including both Geometries and non-spatial attributes.
GeoJSON exists since many years being based on a loose and informal data specification.
Only very recently (2016) it has finally become a respectable standard format based on a formal specification, that is RFC 7946 released by IETF (Internet Engineering Task Force).
Note: RFC 7946 introduced several relevant requirements and restrictions, so that pre-RFC and post-RFC GeoJSON files are not mutually interoperable.
A very remarkable feature of RFC 7946 is that it's explicitly declared to be a fixed and immutable specification.
There will never be updated versions of GeoJSON; even the slighter change will inexorably require changing the name from GeoJSON to some else.
Such a restrinction is obviosly intended to ensure a very strong stability during the time.
The most obvious competitors of GeoJSON are the ESRI Shapefile and GML
The following chart will quickly resume the main differences between them.
Category | Shapefile | GML | GeoJSON | Remarks |
---|---|---|---|---|
File organization | At least three independent files sharing the same name and respectively identified by suffixes .shp, .shx and .dbf
|
GML is based on XML, and conseguently just requires a single, monolithic text file. As any other XML file, GML too can be strongly constrained to verbatim respect a formally defined XML Schema |
Single monolithic text file. Similar in this to XML, but explicitly intended to be by way simpler and less verbose. |
The three-files layout of Shapefile is clearly obsolete, and it frequently poses many headaches causing unexpected troubles. The single-file layout adopted by both GML and GeoJSON is clearly better and safer, and being text files they can be easily inspected and eventually debugged just using any generic text editor without requiring any specific tool. |
Supported Geometry classes |
Notes:
|
GML allows many different ways for defining the same Geometry, and the specifications radically changed from version to version. GML has a really impressive flexibily (e.g. each single Geometry can freely declare its own SRID), but at the cost of imposing an overwhelming complexity. |
Notes:
|
|
back