Features To JSON (Conversion)

ArcGIS Pro 3.3 | | Help archive

Summary

Converts features to Esri JSON or GeoJSON format. The fields, geometry, and spatial reference of features will be converted to their corresponding JSON representation and written to a file with a .json or .geojson extension.

Usage

  • You can enable formatting to make the JSON representation in the output file more readable. The output file will be formatted with spaces, tabs, and carriage returns to improve readability. A formatted JSON may be beneficial for application development and testing. However, it is not recommended for production applications since all of the whitespace is unnecessary and ignored by JSON parsers. Additionally, formatted JSON can be significantly larger than its JSON equivalent, and the file size will be larger than its corresponding JSON representation. This can affect application performance.

  • The conversion does not support joins, relates, and attachments of the features.

  • To convert a subset of features in a feature class or layer, use the Select Layer By Attribute or Select Layer By Location tool and select the subset of features to be converted before using Features To JSON.

  • Use the Output to GeoJSON parameter to create a .geojson file that conforms to the GeoJSON specification. The GeoJSON specification does not support curve geometry; input features that contain curves will be densified during conversion.

  • When the output is a .geojson file, you have the option to project the input features to the WGS 1984 coordinate system, which is the standard for the GeoJSON specification. A default geographic transformation will be applied if necessary. If this option is not used, the output .geojson file will contain a crs tag that can be used in some applications to define the coordinate system or coordinate reference system. This tag is not fully supported under the GeoJSON specification.

  • The tool's output will only include visible attribute fields from the input. To include all fields, you must make them all visible. Additionally, you can use the Use field aliases parameter to make the output use field aliases rather than field names.

Parameters

LabelExplanationData Type
Input Features

The features to convert to JSON format.

Feature Layer
Output JSON

The output .json or .geojson file.

File
Formatted JSON
(Optional)

Specifies whether the JSON will be formatted to improve readability similar to the ArcGIS REST API specification's PJSON (Pretty JSON) format.

  • Unchecked—The features will not be formatted. This is the default.
  • Checked—The features will be formatted to the PJSON specification.

Boolean
Include Z Values
(Optional)

Specifies whether the z-values of the features will be included in the JSON.

  • Unchecked—The z-values will not be included in geometries, and the hasZ property of the JSON will not be included. This is the default.
  • Checked—The z-values will be included in geometries, and the hasZ property of the JSON will be set to true.

Boolean
Include M Values
(Optional)

Specifies whether the m-values of the features will be included in the JSON.

  • Unchecked—The m-values will not be included in geometries, and the hasM property of the JSON will not be included. This is the default.
  • Checked—The m-values will be included in geometries, and the hasM property of the JSON will be set to true.

Boolean
Output to GeoJSON
(Optional)

Specifies whether the output will be created in GeoJSON format.

  • Unchecked—The output will be created in Esri JSON format (.json file). This is the default.
  • Checked—The output will be created in GeoJSON format (.geojson file).

Boolean
Project to WGS_1984
(Optional)

Specifies whether the input features will be projected to the geographic coordinate system WGS_1984 with a default geographic transformation. This parameter only applies when the output is GeoJSON.

  • Checked—Features will be projected to WGS_1984.
  • Unchecked—Features will not be projected to WGS_1984. The GeoJSON will contain a CRS tag that defines the coordinate system. This is the default.

Boolean
Use field aliases
(Optional)

Specifies whether the output file will use field aliases for feature attributes.

  • Unchecked—Output feature attributes will not use field aliases; they will use field names. This is the default.
  • Checked—Output feature attributes will use field aliases.

Boolean

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics