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.
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.
- Create a new custom format using the Quick Import tool by following these instructions.
- Open the Quick Import tool.
- Click the Input Dataset browse button. This opens the Specify Data Source dialog box.
- Click the Format browse button. This opens the Feature Manipulation Engine (FME) Reader Gallery dialog box.
- Click New in the Custom Format group box. This launches the Create Custom Format Wizard.
- In the Create Custom Format Wizard:
- Click Next.
- Click the Format browse button, select KML as the source format, click OK, and click Next.
- Click the Locate Source Data browse button, and navigate to the KML file. Click Open.
- Click Parameters, and click Next.
- Click the check boxes for the FME reader parameters to specify each time using the custom format. Click Next.
- Type a name and description in the appropriate text boxes, and click Next > Finish. This opens the FME Workbench.
- In the FME Workbench:
- Open the attributes of the source feature types.
- Right-click the source feature type, and navigate to Properties. This opens the Feature Type Properties dialog box.
- Click the Format Attributes tab , click Select All to make all attributes visible, and click OK.
- Right-click the destination feature type, and navigate to Copy Attributes from Feature Type
- Select the name of the source feature type from the pull-down list. All attributes are copied to the selected feature type.
- Click Save to save the new custom format. The file is saved as a .fds and added to the FME Reader Gallery.
- 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