Python and Geometry

872
4
09-24-2012 05:17 AM
neilwebster
New Contributor II
Hi All,

I'm trying to find a tutorial on using the Geometry and Cursors but I can't find anything.  Can anybody point me in the direction of one?  All I've been able to find are the ESRI presentations saying it's possible.

I'm trying to do something like the below code extract:
for row in arcpy.da.SearchCursor(poly, ("OBJECTID", "SHAPE@")):
 if row[0] == 82:
  geom = row[1]
  for point in arcpy.da.SearchCursor(point, ("SHAPE@")):
   pgeom = point[0]
   pgeom.intersect(geom,1)
   
   **DO SOMETHING BASED ON THE INTERACTION OF THE POINT/POLY**


Thanks
Tags (2)
0 Kudos
4 Replies
ArkadiuszMatoszka
Occasional Contributor II
http://www.arcgis.com/home/item.html?id=ddfa7bb180e54e9581d842743a032043

You may find this presentation useful. There is simple explanation how to access geometry by cursor.

Regards.
Arek
0 Kudos
neilwebster
New Contributor II
Thanks, I had seen that.  I was after a more detailed description.
0 Kudos
ArkadiuszMatoszka
Occasional Contributor II
OK. This presentation + online arcpy help
(http://resources.arcgis.com/en/help/main/10.1/index.html#/Reading_geometries/002z0000001t000000/  - reading;
http://resources.arcgis.com/en/help/main/10.1/index.html#/Writing_geometries/002z0000001v000000/ - writing)

Is all I got. Can you specify what exactly you want to achieve? Maybe then we could be more helpful 🙂

Best Regards.
Arek
0 Kudos
ChristopherThompson
Occasional Contributor III
this latest python group blog post also deals with creating geometries and the examples use cursors: http://arcpy.wordpress.com/2012/09/14/building-feature-classes-from-numpy-arrays/
0 Kudos