Label | Explanation | Data Type |
Input Placenames File
| A place names text file obtained from GeoNames, NGA GNS, or USGS GNIS. | File |
Data Source
| Specifies the data source from which the input was created.
| String |
Output Location File
| The output location file. | File |
Include Features
(Optional) | Specifies the feature class types from the input data source that will be included in the output.
| String |
Input Regions Of Interest (Optional) | The feature layer that will be used to create a subset of the input place names file. | Feature Layer |
Summary
Creates a location file for use in ArcGIS LocateXT from a text file from GeoNames, National Geospatial-Intelligence Agency Geonet Names Server, or U.S. Geological Survey Geographic Names Information Service.
Usage
The tool takes an input text file from GeoNames, the National Geospatial-Intelligence Agency (NGA) Geonet Names Server (GNS), or the U. S. Geological Survey's (USGS) Geographic Names Information Service (GNIS) for both the United States and Antarctica and creates a custom location file that can be used by the Extract Locations From Text and Extract Locations From Document tools or in the Extract Locations pane. For more information on how to enable custom locations for these tools, see Add and manage custom locations and custom attributes files.
The tool creates a custom location file (.lxtgaz) that can be used on the Custom Locations tab of the Extract Locations pane and with the Extract Locations From Document and Extract Locations From Text tools.
The Data Source parameter is used to identify the source of the input file. GeoNames, GNS, and GNIS formats contain unique schemas and separators. If an incorrect data source is chosen, the output file will be empty. If this occurs, ensure that the selected data source matches the input place names file.
The Include Features parameter is used to limit the feature class types included in the output. Filtering can be done based on the following feature class types:
- Administrative
- Populated places
- Vegetation
- Locality
- Undersea
- Transportation
- Terrain
- Hydrological
- Spot
You can also filter by specifying a region of interest. When a region of interest is specified, the resulting Output Location File value will only contain results that are wholly contained within the specified region of interest.
Place name files can be downloaded from the following locations:
Parameters
arcpy.intelligence.CreateLocationFileFromTextFile(in_placenames_file, data_source, out_location_file, {include_features}, {in_rois})
Name | Explanation | Data Type |
in_placenames_file | A place names text file obtained from GeoNames, NGA GNS, or USGS GNIS. | File |
data_source | Specifies the data source from which the input was created.
| String |
out_location_file | The output location file. | File |
include_features [include_features,...] (Optional) | Specifies the feature class types from the input data source that will be included in the output.
| String |
in_rois (Optional) | The feature layer that will be used to create a subset of the input place names file. | Feature Layer |
Code sample
The following code demonstrates how to use the CreateLocationFileFromTextFile function in a stand-alone script.
# Name: CreateLocationFileFromTextFile.py
# Description: Create a custom location file for use with LocateXT.
# Import system modules
import arcpy
source_file = r'C:\data\US.txt'
data_source = 'GEONAMES'
location_file = r'C:\data\US.lxtgaz'
filter_features = ['POPULATED_PLACES']
loudoun_county = r'C:\virginia.gdb\loudoun_co'
arcpy.CreateLocationFileFromTextFile_intelligence(source_file,
data_source,
location_file,
filter_features,
loudoun_county)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Yes