Add point coordinates to table

This tool modifies the attribute table of a shapefile of POINT ShapeType by adding two fields, XCOORD and YCOORD, containing each point's X and Y coordinates respectively.


See Also:

Scripting:

The following is an example of a Python script using this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.shp"
args = [inputFile]
pluginHost.runPlugin("AddPointCoordinatesToTable", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.shp"
String[] args = [inputFile]
pluginHost.runPlugin("AddPointCoordinatesToTable", args, false)


Credits: