If
the Input Data value is a folder, it will be recursively searched for KML (.kml) and KMZ (.kmz) files, shapefiles (.shp), Excel workbooks (.xlsx and .xls), tabular text files (.csv, .txt, and .tab), GeoJSON files (.geojson), and GPX files (.gpx). The Filter parameter can be used to limit which files are imported from folders.
Rasters, or ground overlays contained in a .kml or .kmz file, are converted into a mosaic dataset in the Target Geodatabase parameter. The source rasters referenced by the mosaic dataset are stored in their native format in a subfolder named after the mosaic dataset. This is located at the same location as the target geodatabase. These files are named after the Target Geodatabase value and appended with _Rasters. For example, if the Target Geodatabase value is C:\Data\OperationalData.gdb, a folder named OperationalData_Rasters will be created under C:\Data.
If you are importing files into an enterprise geodatabase, ensure that the database connection file (.sde) is specified as a UNC path in the Target Geodatabase parameter and that the path is accessible by the enterprise geodatabase.
KML and KMZ input up to KMZ version 2.2 of the Open Geospatial Consortium KML standard is generally supported. Point locations that use the address tab (by way of geocoding) are not supported. A valid latitude and longitude location is required in the source KML.
The standard delimiter for tabular text files with .csv and .txt extensions is a comma; for files with a .tab extension, it's a tab. To use an input table with a nonstandard delimiter, the delimiter must be specified using a schema.ini file. See Schema.ini File (Text File Driver) in the Microsoft documentation for more information.
For input Excel worksheets and tabular text files, only point geometry is supported.
The GeoJSON specification supports multiple geometry types. A separate feature class will be created for each geometry type in the input .geojson file using the naming convention SourceGeoJSONFile_GeometryType. For example, if the .geojson file is named World Airports.geojson and contains point, multipoint, polyline, and polygon geometry types, the feature classes will be named World Airports_Points, World Airports_Multipoint, World Airports_Polylines, and World Airports_Polygons.
Coordinate systems have the following considerations when running this tool:
- For shapefiles, and .kml, .kmz, .geojson, and .gpx files, the coordinate system of the output dataset will be the same as the input dataset. The KML and GPX specifications mandate the coordinate system of the input dataset to be GCS WGS1984.
- For Excel workbooks and tabular text files, the coordinate system of the output will be GCS WGS1984.
If any of the input coordinates for a feature are invalid (null or invalid coordinate notation), the corresponding feature will have a null geometry. The Check Geometry tool can be used to identify null geometries in the output.
Supported coordinates for tabular text files (.csv, .txt, and .tab) and Excel worksheets are latitude and longitude in decimal degrees, Military Grid Reference System (MGRS), and United States National Grid (USNG). The source is searched for coordinate columns in the following order: latitude and longitude in separate columns, latitude and longitude in a single column, MGRS, and finally USNG.
For latitude and longitude values in a single column, the latitude value must be first, then longitude separated by a space, a comma, or a slash.
The following are valid column names:
- Latitude—latitude, lat, y_coordinate, y_coord, and y
- Longitude—longitude, long, lon, x_coordinate, x_coord, and x
- Latitude/longitude—latitude_longitude, lat_long, lat_lon, xy_coordinate, xy_coordinates, xy_coord, xy_coords, and xy
- MGRS coordinate—mgrs, mgrs_coordinate, mgrs_coordinates, mgrs_coord, and mgrs_coords
- USNG coordinate—usng, usng_coordinate, usng_coordinates, usng_coord, and usng_coords
All worksheets in an Excel workbook will be imported.
Symbology is applied to the output layers that are added to the map based on the symbology in the source data files as follows:
An active map must exist in the AllSource project at the time of tool execution to maintain the symbology. If the tool is running outside an AllSource project—in other words, from a stand-alone Python script—the symbology will not be maintained.
- For output layers created from .kml or .kmz files, the symbology is extracted from the source .kml or .kmz file and applied to the output layers. This symbology can be overridden by providing a layer file (.lyrx or .lyr) in the same folder as the source .kml or .kmz file. The layer file must have the same base name as the source data file, appended with an underscore (_), and the geometry type (points, polylines, or polygons) of the layer to be overridden. For example, if the .kml file is named World Airports.kml and contains point, line, and polygon features and you want to override the symbology for all geometry types, the layer files would be named World Airports_Points.lyrx, World Airports_Polylines.lyrx, and World Airports_Polygons.lyrx. The geometry type values are case sensitive. If a layer file does not exist for a given geometry type, the symbology from the source .kml or .kmz file is applied to the output layer.
- For output layers created from sources other than .kml or .kmz files, symbology is applied to the output layer if a layer file (.lyrx or .lyr) exists in the same folder as the source data file. The layer file must have the same base name as the source data file, except Excel worksheets and .geojson files. For Excel worksheets, the layer file must be named the same as the base name of the source data file, appended by an underscore (_) and the worksheet name. For example, if the Excel file is named World.xlsx and contains a worksheet named Cities (2018), the layer file must be named World_Cities (2018).lyrx or World_Cities (2018).lyr. For .geojson files, the layer file must be named the same as the base name of the source data file, appended by an underscore (_) and the output geometry type—points, multipoint, polylines, and polygons. If a layer file does not exist, a default symbol will be applied to the output layer.