Select to view content in your preferred language

xy table to points

3824
3
Jump to solution
10-29-2014 12:21 PM
StephenEldridge
Deactivated User

I have a table that is automatically generated that has XY coordinates in it.  Is there a tool or python script  to make that into a point feature?

0 Kudos
1 Solution

Accepted Solutions
StephenEldridge
Deactivated User


OK here is how it is done.  Got clues from both replies, thanks.

Use Make XY Event Layer which is only a temporary file and then used the temporary output from the XY Event Layer as the Input for Feature to Point to get my feature made.

Thanks for your quick responses and help

Script Example:

# ---------------------------------------------------------------------------
# Changes.py
# Created on: 2014-10-29 14:39:36.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Set the necessary product code
# import arcinfo

# Import arcpy module
import arcpy

# Local variables:
Changes = "\\\\Path\\Name"
Changes_Layer = "Changes_Layer"
Updates = "\\\\Destination Path\\Updates"

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(Changes, "longitude", "latitude", Changes_Layer, "", "")

# Process: Feature To Point
arcpy.FeatureToPoint_management(Changes_Layer, Updates, "CENTROID")

View solution in original post

0 Kudos
3 Replies
TimWitt2
MVP Alum

Stephen,

check this out ArcGIS Help 10.1

Tim

0 Kudos
OwenEarley
Frequent Contributor

Check out the Make XY Event Layer in the Data Management Toolbox  > Layers and Table Views.

0 Kudos
StephenEldridge
Deactivated User


OK here is how it is done.  Got clues from both replies, thanks.

Use Make XY Event Layer which is only a temporary file and then used the temporary output from the XY Event Layer as the Input for Feature to Point to get my feature made.

Thanks for your quick responses and help

Script Example:

# ---------------------------------------------------------------------------
# Changes.py
# Created on: 2014-10-29 14:39:36.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Set the necessary product code
# import arcinfo

# Import arcpy module
import arcpy

# Local variables:
Changes = "\\\\Path\\Name"
Changes_Layer = "Changes_Layer"
Updates = "\\\\Destination Path\\Updates"

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(Changes, "longitude", "latitude", Changes_Layer, "", "")

# Process: Feature To Point
arcpy.FeatureToPoint_management(Changes_Layer, Updates, "CENTROID")

0 Kudos