I'm surprised this still isn't supported, since the 10.2 documentation states: "The records returned by SearchCursor can be constrained to match attribute criteria or spatial criteria." But how to constrain the records to match spatial criteria?
I recently had the chance to experiment with the methods exposed off the geometry object. I was working with file geodatabase and I found these operators to be very fast, especially when compared with using tools like Select Layer By Location.
good one. very useful.
This would be very useful.
arcpy.MakeQueryLayer_management(r'Database Connections\Connection to pardy.sde', 'CMarkets', """SELECT c.mkt_id, c.shape, c.names FROM cola_markets c WHERE SDO_OVERLAPS(c.shape, SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(4,6, 8,8))) = 'TRUE'""", "MKTID") arcpy.GetCount_managment("CMarkets") rows = arcpy.da.SearchCursor("CMarkets", "NAMES")
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.