-
Notifications
You must be signed in to change notification settings - Fork 159
JSON Formats
The Features to JSON geoprocessing tool generates JavaScript Object Notation (JSON) from Esri features in ArcGIS. This JSON is easily readable and processed by Hadoop systems. It is generated in two flavors:
- Enclosed JSON
- Unenclosed JSON
Both are provided to support different application requirements and user workflows.
An enclosed JSON document is a valid document in its entirety based on standard JSON specifications. It has header information including the features spatial reference if applicable. It can not be appended to without making it an invalid JSON document.
{
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "Id",
"type": "esriFieldTypeOID",
"alias": "Id"
},
{
"name": "Name",
"type": "esriFieldTypeString",
"alias": "Name"
}
],
"features": [
{
"geometry": {
"x": -104.44,
"y": 34.83
},
"attributes": {
"Id": 43,
"Name": "Feature 1"
}
},
{
"geometry": {
"x": -100.65,
"y": 33.69
},
"attributes": {
"Id": 67,
"Name": "Feature 2"
}
}
]
}
The unenclosed JSON is a simplified version of the enclosed JSON. There is no header information and it can be appended to. While this JSON is not valid as an entire document, when read into Hadoop with the help of the JSON-Utilities, it is broken up into individual records which are valid and can be parsed with a JSON parser. (Unenclosed JSON is similar to, but more general than, JSON Lines.)
{
"geometry": {
"x": -104.44,
"y": 34.83
},
"attributes": {
"Id": 43,
"Name": "Feature 1"
}
}
{
"geometry": {
"x": -100.65,
"y": 33.69
},
"attributes": {
"Id": 67,
"Name": "Feature 2"
}
}