<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Wish list: spatial queries with arcpy.da in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87375#M6842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This would be very useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 01:12:37 GMT</pubDate>
    <dc:creator>stevegourley</dc:creator>
    <dc:date>2015-01-13T01:12:37Z</dc:date>
    <item>
      <title>Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87372#M6839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to see da support spatial queries (i.e. using a geometry class, since not all geodatabases support spatial SQL).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 14:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87372#M6839</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2012-01-04T14:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87373#M6840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are currently no plans for the data access (da) module to support spatial queries. However, for file geodatabases, personal geodatabases, shapefiles, etc., you can use the Select Layer By Location tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10.1 final, you will be able to use a new tool named Make Query Layer which allows you create a query layer from a DBMS table based on an input SQL select statement. The SQL can include a spatial query. This layer can then be used as input to GP tools and supported by the da module. Here is an example of creating a query layer with a SQL spatial query and using it in a tool or in searchcursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;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")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87373#M6840</guid>
      <dc:creator>JasonPardy</dc:creator>
      <dc:date>2021-12-10T23:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87374#M6841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This would be a welcome and useful addition&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 21:11:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87374#M6841</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2012-01-06T21:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87375#M6842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This would be very useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 01:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87375#M6842</guid>
      <dc:creator>stevegourley</dc:creator>
      <dc:date>2015-01-13T01:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87376#M6843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good one. very useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 06:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87376#M6843</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2015-01-13T06:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87377#M6844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recently had the chance to experiment with the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018z00000070000000"&gt;methods exposed off the geometry object.&lt;/A&gt; 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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 07:20:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87377#M6844</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-01-13T07:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wish list: spatial queries with arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87378#M6845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm surprised this still isn't supported, since the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000011000000"&gt;10.2 documentation&lt;/A&gt; states: "The records returned by &lt;SPAN class="usertext"&gt;SearchCursor&lt;/SPAN&gt; can be constrained to match attribute criteria or spatial criteria." But how to constrain the records to match spatial criteria?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 12:29:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wish-list-spatial-queries-with-arcpy-da/m-p/87378#M6845</guid>
      <dc:creator>FridjofSchmidt</dc:creator>
      <dc:date>2015-07-17T12:29:27Z</dc:date>
    </item>
  </channel>
</rss>

