HOW TO

Convert a JSON URL to a feature class using the Data Interoperability extension

Last Published: April 25, 2020

Summary

JavaScript Object Notation (JSON) is a text-based, lightweight data interchange format used to share GIS data between ArcGIS and other systems. The JSON To Features tool creates a feature class from a JSON file, but not from a JSON URL. However, the ArcGIS Data Interoperability extension for Desktop provides the function to convert a JSON URL to a feature class using the Spatial ETL tool. The output feature class contains the fields, geometry type, and spatial reference as defined in the JSON URL.

The script below shows some parts of a JSON URL containing the X (longitude) and Y (latitude) coordinates of each feature.

[
{
"json_featuretype":"Metadata"
,"ExtractDate":"2018-10-23"
,"ExtractFrequency":"Daily"
}
,{
"json_featuretype":"CurrentIssues"
,"STREETNUMBER":"320"
,"STREET":"PALM STREET"
,"TOTALUNITS":60
,"BUSINESSOPERATOR":"0707"
,"TOTALOUTSTANDING":1
,"LATITUDE":49.28261413
,"LONGITUDE":-123.10664756
}
,{
"json_featuretype":"CurrentIssues"
,"STREETNUMBER":"404"
,"STREET":"PALM STREET"
,"TOTALUNITS":71
,"BUSINESSOPERATOR":"Central City"
,"TOTALOUTSTANDING":1
,"LATITUDE":49.2816849
,"LONGITUDE":-123.10713559
}
,{
"json_featuretype":"CurrentIssues"
,"STREETNUMBER":"1656"
,"STREET":"COCOA STREET"
,"TOTALUNITS":46
,"BUSINESSOPERATOR":"Housing Society"
,"TOTALOUTSTANDING":2
,"LATITUDE":49.27733406
,"LONGITUDE":-123.07200187
}

Procedure

The following instructions describe how to convert a JSON URL to a feature class using the ArcGIS Data Interoperability extension in ArcMap:

Note:
A Data Interoperability license is required to create the spatial ETL tool.
  1. Create a spatial ETL tool in the Catalog pane and specify the following FME reader and writer parameters.
    1. In the Reader section, set the Format to JSON (JavaScript Object Notation).
    2. For the Dataset, specify the JSON URL.
    3. In the Writer section, set the Format to Esri Geodatabase (File Geodb ArcObjects) to convert the JSON URL to a file geodatabase feature class.
    4. For the Dataset, browse to an existing file geodatabase to locate the converted feature class.
An image of the Generate ETL Tool dialog box.
  1. Click OK. The Spatial ETL Tool window appears.
  1. In the Spatial ETL Tool window, add the VertexCreator transformer to the workspace canvas from the Transformer Gallery window. To open the window, click View > Windows > Transformer Gallery.
    1. Drag and drop to add the VertexCreator transformer and connect it to the reader.
An image of the spatial ETL tool connector.
  1. In the VertexCreator Parameters dialog box, map the X Value and Y Value parameters with the longitude and latitude attribute values given in the JSON URL respectively.
An image of the VertexCreator parameters.
  1. Click OK.
  1. Add a CoordinateSystemSetter transformer to tag all features with a coordinate system.
    1. Drag and drop to add the CoordinateSystemSetter transformer and connect it to the previous transformer output.
    2. In the CoordinateSystemSetter Parameters dialog box, select the Coordinate System.
An image of the CoordinateSystemSetter Parameters dialog box.
  1. Click OK.
  1. Add an AttributeCreator transformer to import the attributes from the JSON URL to the output features.
    1. Drag and drop to add the AttributeCreator transformer and connect it to the previous transformer output.
    2. In the AttributeCreator Parameters dialog box, click Import. An Import Wizard dialog box opens.
    3. In the Format parameter, select JSON (JavaScript Object Notation).
    4. In the Dataset parameter, insert the JSON URL and click Next.
    5. Specify whether to import data from the names or values of attributes in the selected feature type(s), and click Next.
    6. Select the attributes to import in the New Attribute and Attribute Value sections, and click Import.
An image of the Import Wizard dialog box.
  1. Click OK to close the AttributeCreator Parameters dialog box.
An image of the AttributeCreator Parameters dialog box.
  1. Manually connect the output and attributes from the AttributeCreator transformer to the writer.
An image of the data flow diagram.
  1. Double-click the writer to edit the output feature type properties.
    1. In the General tab, select the Geometry type. For example, select geodb_point to convert the JSON URL to a point feature class.
An image of the Feature Type Properties dialog box.
  1. Click OK.
  1. Click Save An image of the Save icon., and click Run An image of the Run icon.. The output feature class is located in the file geodatabase specified in Step 1(d). To view the data, add the feature class into ArcMap.
The image below shows a point feature class converted from a JSON URL in ArcMap.
An image of a feature class converted from a JSON URL in ArcMap.

Article ID:000019108

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic