Using ArcPy to plot points in a map

4747
2
09-01-2011 09:36 AM
JasonMarcinski
New Contributor
I see that it is possible to create a a point geometry object in arcpy, but can I give it a graphic element to display or plot that point in a map document?

I am trying to see if I can port some of my VBA stuff over to ArcPy.
Tags (2)
0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor
You won't be able to add the point as a graphic, but you can add it as a shapefile/feature class using the PointGeometry class and the CopyFeatures_management function.  Here is an example:

import arcpy
from arcpy import env
env.outputCoordinateSystem = r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"
env.workspace = r"C:\temp\python\test.gdb"

point = arcpy.Point(-97.36, 101.56)

pointGeometry = arcpy.PointGeometry(point)

arcpy.CopyFeatures_management(pointGeometry, "Hydrant")
0 Kudos
JasonMarcinski
New Contributor
Thank you!
0 Kudos