How do you create a Point Shapefile at a known XY location in python (ArcGIS)?

1052
4
07-31-2017 02:12 PM
AndrewMartin8
New Contributor III

I am currently writing a python program that is scanning cells in a raster. If the program passes an if statement then I want to put a point file at that exact xy location it scanned. What is the function that inserts a shapefile at a specific xy location?

Tags (1)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

You would need to create the geometry first, then the featureclass or shapefile.  Start by examining the arcpy functions etc and specifically the code example in the PointGeometry class linked here

AndrewMartin8
New Contributor III

what is the function that converts the point geometry into a feature class?

0 Kudos
DanPatterson_Retired
MVP Emeritus

the last line int he link I posted 

arcpy.CopyFeatures_management(pointGeometryList, "c:/geometry/a.gdb/points")
DanPatterson_Retired
MVP Emeritus

In one of your other threads... Copy Features was recommended.  Posting in one location makes it easier for people to keep track of a question and its incarnations.

0 Kudos