GeoJSON (.geojson)


    • MIME type: application/geo+json.
    • GeoJSON GIS format.
    • Geospatial data interchange format based on JavaScript Object Notation (JSON).
    • Open standard format for representing simple geographical features.
    • GeoJSON identifies GeoJSON objects with list of rules in the Wolfram Language.
    • GeoJSON is specified by RFC 7946.

Import & Export

  • Import["file.geojson"] imports a GeoJSON file and renders it as a GeoGraphics object.
  • Import["file.geojson","elem"] imports the specified element from a GeoJSON file.
  • Import["file.geojson",{{"elem1","elem2",}}] imports multiple elements.
  • Export["file.geojson",expr] exports a GeoGraphics or DynamicGeoGraphics expression to a GeoJSON file.
  • Coordinate numbers where scientific notation is used are given in JSON in E notation.
  • The symbols True and False are represented in JSON as the values true and false.
  • The GeoJSON format does not store geo projection information.

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties and settings
  • Data representation elements:
  • "Data"rule-based representation for each feature of the GeoJSON archive
    "Graphics"all geometric features combined into a single GeoGraphics object
    "GraphicsList"list of graphics representing the geometric features of a GeoJSON archive
  • Import by default uses the "Graphics" element for the GeoJSON format.
  • Spatial information elements:
  • "CoordinateSystem"name of the coordinate reference system
    "SpatialRange"range of geographic coordinates, typically given in decimal degrees
  • Low-level meta-information from the file:
  • "CoordinateSystemInformation"raw parameters of the coordinate reference system


  • Export options:
  • "Compact"Falsewhether to omit line breaks and tabs


open all close all

Basic Examples  (3)

Import the contents of a GeoJSON file:

Click for copyable input

Export a GeoGraphics object as a GeoJSON file:

Click for copyable input
Click for copyable input

Import the GeoJSON file:

Click for copyable input

Print the GeoJSON code:

Click for copyable input

Read a GeoJSON file as a string:

Click for copyable input

Import the string and interpret it as a GeoGraphics object:

Click for copyable input

Scope  (6)

Import Elements  (4)

Export Options  (1)

Applications  (1)

Introduced in 2017