English

Problem: Attributes are missing when a layer file created by KML to Layer tool is added to ArcMap

Description

When a layer created by the KML to Layer conversion tool is added to ArcMap, some of the attributes in the feature class are not transferred.

Cause

The issue occurs when special characters such as hyphens, spaces, brackets, and so forth are present in field names in the Keyhole Markup Language (KML) file. When the tool converts the KML files, fields containing these special characters cannot be read by ArcMap, resulting in missing attributes.

Note:
KML data stores information in a single field formatted in HTML style, while in feature classes and shapefiles, data is stored in attribute tables. Hence, when converting KML files to layers, there are challenges in transferring the KML information so it can be read in attribute table style. Although the information is retained in the layers, it is not parsed into individual fields in the attribute table. This is a known behavior.

Solution or Workaround

Use the Data Interoperability Quick Import tool to create a new custom format.

Note:
To use this tool, the ArcGIS Data Interoperability extension is required.

  1. Create a new custom format using the Quick Import tool by following these instructions.
    a. Open the Quick Import tool.
    [O-Image]

    b. Click the Input Dataset browse button. This opens the Specify Data Source dialog box.
    c. Click the Format browse button. This opens the Feature Manipulation Engine (FME) Reader Gallery dialog box.
    d. Click New in the Custom Format group box. This launches the Create Custom Format Wizard.
    [O-Image]

    In the Create Custom Format Wizard:

    a. Click Next.
    b. Click the Format browse button, select KML as the source format, click OK, and click Next.
    c. Click the Locate Source Data browse button, and navigate to the KML file. Click Open.
    d. Click Parameters, and click Next.
    e. Click the check boxes for the FME reader parameters to specify each time using the custom format. Click Next.
    f. Type a name and description in the appropriate text boxes > Next > Finish. This opens the FME Workbench.

    In the FME Workbench:

    a. Open the attributes of the source feature types.
    b. Right-click the source feature type, and navigate to Properties. This opens the Feature Type Properties dialog box.
    c. Click the Format Attributes tab > Select All to make all attributes visible > OK.
    [O-Image]

    d. Right-click the destination feature type, and navigate to 'Copy Attributes from Feature Type'.
    [O-Image]

    e. Select the name of the source feature type from the pull-down list. All attributes are copied to the selected feature type.
    f. Click Save to save the new custom format. The file is saved as a .fds and added to the FME Reader Gallery.
    g. Exit FME Workbench.

  2. Run the Quick Import tool using the previously created custom format as the reader and the same KML file input as the source.
  3. View the result in the attribute table.

Related Information