Problem: Attributes are missing when a layer file created by KML to Layer tool is added to ArcMap
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.
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.
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.
To use this tool, the ArcGIS Data Interoperability extension is required.
- Create a new custom format using the Quick Import tool by following these instructions.a. Open the Quick Import tool.
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.
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.
d. Right-click the destination feature type, and navigate to 'Copy Attributes from Feature Type'.
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.
- Run the Quick Import tool using the previously created custom format as the reader and the same KML file input as the source.
- View the result in the attribute table.
- ArcGIS Resources: KML to Layer (Conversion)
- ArcGIS Resources: What is the Data Interoperability extension?
- ArcGIS Resources: Creating a custom format