Description
In some instances, extracting locations using the ArcGIS LocateXT extension to search unstructured data generates an empty output layer. Clicking Zoom to Layer zooms out to the full extent of the basemap, and the attribute table of the output layer appears empty.
Cause
This issue occurs if the underlying text or document uses a coordinate system or projection that is different from GCS WGS 1984. By default, the ArcGIS LocateXT extension scans documents and generates points in the GCS WGS 1984 coordinate system.
Solution or Workaround
As a workaround, create custom location and attribute files to extract coordinates from the documents as texts. Use the XY Table To Point tool to plot the points of the extracted coordinates in the correct coordinate system. The text documents must be scanned in a standard layout. The image below shows an example text document that must be extracted.
- Create a custom location file in the Extract Locations pane.
- Access the Custom Locations tab.
- Enable the Create features from custom locations option, and click New File .
- In the Location Name column of the Custom Location File dialog box, type the name of a place or word that exists in all the documents that must be. In this example, type Location: in the Location Name column because the word appears in each document representing the coordinates.
Note:
The ArcGIS LocateXT extension scans the input document to determine the existence of the inserted location. For more information, refer to Define a custom location.
- Maintain the Location Coordinate column at default, and click Save.
- In the Save Custom Location File dialog box, set a name for the custom location file, and click Save.
- Click Close to close the Custom Location File dialog box.
- Click the Make Active icon to activate the newly created custom location file in the Extract Locations pane.
- Add custom attributes to capture the latitude and longitude values in the extracted attribute table. For more information, refer to Add an attribute.
- In the Custom Attribute File pane, set the Attribute Name to record the latitude values. In this example, it is Cordlat.
- Set a keyword in the Keywords parameter. In this example, it is Location:.
- For Capture Type, select Capture until stop string.
- Set the Stop String Text. In this example, it is set to ', ' because the text after the end of the latitude is always a comma and a space in all documents.
- Click Add Keyword to add the keyword.
- Set the Attribute Name for the second attribute to record the longitude. In this example, Cordlong is set as the new attribute name.
- Set a keyword in the Keywords parameter. In this example, ', ' is set as a keyword.
- For Capture Type, select Capture until stop string.
- Set the Stop String Text. In this example, it is set to Suspected because the text after the end of the longitude is always Suspected Age in all documents.
- Click Add Keyword to add the keyword.
- Click Save and Close.
- In the Extract Locations pane, click the Make Active icon to activate the custom attribute file.
- Click the Extract tab and insert the files or text to scan in Input.
- Set other parameters as desired and click Extract to scan the input files or text. A new point feature class is added in the Contents pane with the latitude and longitude values recorded in the attribute table.
- Use the Table To Table tool to export the attributes to new a table. A new table is added in the Contents pane.
- Optionally, in the Fields view of the new table, delete the unnecessary fields. Refer to Delete a field for steps to do this.
- In the new table, create two new fields with Double data type to store the latitude and longitude values.
Note:
This step is important because in a later step, the tool requires latitude and longitude values to be stored in a numeric field.
- Create two new fields and select the Double data type.
- Right-click one of the new fields and select Calculate Field.
- Under the Expression section in the Calculate Field pane, select the field containing the latitude values, and click Run.
- Repeat steps 9a through 9c for the other new field to store the longitude values.
- Use the XY Table To Point tool to display the points from the new table.
- For Input Table, select the new table generated by the Table To Table tool.
- Set a name for the Output Feature Class.
- Identify the X Field and Y Field.
- Select the Coordinate System of the scanned text or file. In this example, it is the WGS 1984 Web Mercator (Auxiliary Sphere) coordinate system.
- Click Run.
A new feature class is added to the map displaying the points.
Note:
When the coordinates begin and end with parentheses, for example (45978.00, -124.563248), the coordinates can be captured at (0,0) and their actual coordinates recorded as attribute data. In this case, set the open parenthesis '(' as the keyword, the comma as a stop string and a start string for another attribute with the closing parenthesis ')' as a stop string.