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 an ArcGIS Enterprise portal and provides links to instructions:
- Add a GeoJSON file to My Content to share it.
- Publish a hosted feature layer from a GeoJSON file.
- For hosted feature layers that have export enabled, you can export the layer data to a GeoJSON file.
- Add a GeoJSON file as a layer to Map Viewer Classic.
Note:
This functionality is currently only supported in Map Viewer Classic (formerly known as Map Viewer). It will be available in a future release of the new Map Viewer.
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 might 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 your portal as an item or as a layer in Map Viewer Classic, your portal verifies the validity of the file and displays an error message if the file is invalid. To be considered valid, your 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: