Add XY Coordinates (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Adds the fields POINT_X and POINT_Y to the point input features and calculates their values.
Illustration
Usage tips
Add XY Coordinates is most commonly used to get access to feature class geometry to perform queries or analysis or extract features based on their x,y location.
If the fields POINT_X and POINT_Y fields already exist, the values will be updated.
If the features are moved after using Add XY Coordinates, the POINT_X and POINT_Y values will not represent the new locations. To update their values to the new location, rerun the tool. The values for POINT_X and POINT_Y are not modified by other tools, such as Project.
If your input features are in a geographic coordinate system, POINT_X and POINT_Y represent the longitude and latitude, respectively.
Add XY Coordinates will also add POINT_Z and POINT_M fields when the input features is z- and m-enabled.
If an layer in ArcMap is selected as the input feature class, the XY coordinates will be based on the coordinate system of the input not the coordinate system of the dataframe (if they are different).
The following environments affect this tool: extent and workspace.
Command line syntax
An overview of the Command Line window
AddXY_management <in_features>
Parameter | Explanation | Data Type |
<in_features> |
The point features whose x,y coordinates will become feature fields. |
Feature Layer |
addxy_management c:\temp\wellsites.shp
Scripting syntax
About getting started with writing geoprocessing scripts
AddXY_management (in_features)
Parameter | Explanation | Data Type |
in_features (Required) |
The point features whose x,y coordinates will become feature fields. |
Feature Layer |
import arcgisscripting gp = arcgisscripting.create() gp.workspace = "c:/temp" gp.toolbox = "management" gp.addxy("wellsites.shp")