<?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: efficient spatial query on many feature classes? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644601#M50264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clever idea!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if this single command is really running N queries under the hood. I will try performance testing this, but if anyone out there has an idea, I'd appreciate the feedback. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2018 02:30:45 GMT</pubDate>
    <dc:creator>davedoesgis</dc:creator>
    <dc:date>2018-11-15T02:30:45Z</dc:date>
    <item>
      <title>efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644596#M50259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Short version: Is there an efficient way to query 300+ feature classes with the same select-by-location query for an area of interest? We can do this using spatial SQL(SQL Server), ArcGIS Server map/feature services, or Portal layers. I can load most of the data into ArcGIS OnLine, but licensing agreements will require me to keep some layers locally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Long-ish version: I inherited some ArcPy code from a former coworker that starts with a polygon of interest, queries the SDE database (SQL Server) for any features that overlap, and creates a PDF report of them. There are over 300 different layers in the report, which would mean a lot of database queries. He solves this by combining all the data into a single feature class each for points, lines, and polygons. It's really quick with only 3 queries to the database. Since the input layers all have different attribute fields, his process appends all the fields into a single text field in the format "field1: value1; field2: value2; field3: value3; [field4 etc.]".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's actually a pretty clever solution, except that it requires a bunch of processing to consolidate all the data into those 3 feature classes for data loading/updating. More code is needed for all the string parsing to turn the one delimited text field back into N fields. Plus, we lose track of field types, since everything is just a string.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Going forward, I'd like to just maintain all my feature classes separately and do away with the merged layers, but I also can't wait 10 minutes to do 300+ queries. Multi-threading could make it a bit faster, but might melt also my server. So, is there an efficient way to send the same select-by-location query to a whole bunch of feature classes in SDE? How about to ArcGIS Server, Portal, or ArcGIS Online? &lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 02:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644596#M50259</guid>
      <dc:creator>davedoesgis</dc:creator>
      <dc:date>2018-11-14T02:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644597#M50260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try making a near table which supports multiple input features.&lt;/P&gt;&lt;P&gt;Just get the closest and read the table.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/generate-near-table.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/generate-near-table.htm"&gt;Generate Near Table—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 08:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644597#M50260</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2018-11-14T08:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644598#M50261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding a few more communities that may be able to help: &lt;A href="https://community.esri.com/group/1680"&gt;Geodatabase&lt;/A&gt;‌ &lt;A href="https://community.esri.com/space/2053"&gt;Enterprise GIS&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 11:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644598#M50261</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2018-11-14T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644599#M50262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems like this querying is part of a process to generate PDF reports, why is 10 minutes for the process to execute a problem?&amp;nbsp; Is the process running more frequently than 10 minutes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 17:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644599#M50262</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-14T17:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644600#M50263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Users run this by submitting the area of interest polygon from a web app. They are sitting there watching an hourglass until it returns the result. I agree that if it were just a cron job, then it could take longer, but there is a user waiting on the other end. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 02:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644600#M50263</guid>
      <dc:creator>davedoesgis</dc:creator>
      <dc:date>2018-11-15T02:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644601#M50264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clever idea!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if this single command is really running N queries under the hood. I will try performance testing this, but if anyone out there has an idea, I'd appreciate the feedback. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 02:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644601#M50264</guid>
      <dc:creator>davedoesgis</dc:creator>
      <dc:date>2018-11-15T02:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644602#M50265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, George!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 02:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644602#M50265</guid>
      <dc:creator>davedoesgis</dc:creator>
      <dc:date>2018-11-15T02:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: efficient spatial query on many feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644603#M50266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that the generation of near tables can be very quick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 08:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/efficient-spatial-query-on-many-feature-classes/m-p/644603#M50266</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2018-11-15T08:46:19Z</dc:date>
    </item>
  </channel>
</rss>

