GeoJSON

GeoJSON is an open standard geospatial data interchange format that represents simple geographic features and their nonspatial attributes. Based on JavaScript Object Notation (JSON), GeoJSON is a format for encoding a variety of geographic data structures. It uses a geographic coordinate reference system, World Geodetic System 1984, and units of decimal degrees.

The following list summarizes how you can use GeoJSON files in ArcGIS Online and provides links to instructions:

Supported feature types

GeoJSON supports the following feature types:

  • Point (including addresses and locations)
  • Line string (including streets, highways, and boundaries)
  • Polygon (including countries, provinces, and tracts of land)
  • Multipart collections of point, line string, or polygon features

GeoJSON features are not only used to represent entities of the physical world. For example, mobile routing and navigation apps may describe their service coverage using GeoJSON.

Supported geometry types

GeoJSON supports the following geometry types:

  • Point
  • LineString
  • Polygon
  • MultiPoint
  • MultiLineString
  • MultiPolygon

Geometric objects with additional properties are Feature objects. FeatureCollection objects contain sets of features.

Sample GeoJSON

The following is an example of a valid GeoJSON file:

{ "type": "FeatureCollection",
    "features": [
      { "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [102.0, 0.5]
          },
          "properties": {
            "prop0": "value0"
          }
        },
      { "type": "Feature",
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
            ]
          },
        "properties": {
          "prop0": "value0",
          "prop1": 0.0
          }
        },
      { "type": "Feature",
         "geometry": {
           "type": "Polygon",
           "coordinates": [
             [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
               [100.0, 1.0], [100.0, 0.0] ]
             ]
         },
         "properties": {
           "prop0": "value0",
           "prop1": {"this": "that"}
           }
         }
       ]
     }

File validation

When you add a GeoJSON file to ArcGIS Online as an item or as a layer in a map, ArcGIS Online verifies the validity of the file and displays an error message if the file is invalid. To be considered valid in ArcGIS Online, a GeoJSON file must begin with the mandatory type parameter set to FeatureCollection as follows:

"type": "FeatureCollection"

References

For more information about GeoJSON formatting and validation, see the following: