<?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: In Python, what is the best library to do parallel or concurrent processing of GIS workflows? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/in-python-what-is-the-best-library-to-do-parallel/m-p/740477#M57269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awhile back i had helped someone by making this gist. Its&amp;nbsp;using the multiprocessing library to do parallel calculations on a data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is generally the setup i use, specifically queue based so you are always trying to let every process pull a value from a shared pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gist.github.com/namur007/e17ccbb1aafe230774fb49add4badd34" title="https://gist.github.com/namur007/e17ccbb1aafe230774fb49add4badd34"&gt;Multiprocessing ArcGIS/Arcpy · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i recall i had changed it slightly to not use queue.empty and just wrapped it in a try:catch: instead to avoid&amp;nbsp;some other issues. that one doesn't show it, but it's easy to modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feel free to ask if you have any questions on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/namur007/arcpy_multiprocessing_template/tree/master/Toolbox/code" title="https://github.com/namur007/arcpy_multiprocessing_template/tree/master/Toolbox/code"&gt;arcpy_multiprocessing_template/Toolbox/code at master · namur007/arcpy_multiprocessing_template · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one should have the proper logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2020 20:11:44 GMT</pubDate>
    <dc:creator>CodyScott</dc:creator>
    <dc:date>2020-07-07T20:11:44Z</dc:date>
    <item>
      <title>In Python, what is the best library to do parallel or concurrent processing of GIS workflows?</title>
      <link>https://community.esri.com/t5/python-questions/in-python-what-is-the-best-library-to-do-parallel/m-p/740476#M57268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I often do big data analytics where the PC or server I use is unable to handle conventional data processing workflows. Or it just takes too long to process. I work in an environment and have a home PC where I have multiple cores and decent size RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get big data projects done, I manually run separate instances of Python scripts (e.g., 10 separate python files running at the same time) on input data that I have partitioned, and concatenate the results on the back-end once all models are complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a Python library that is built for parallel or concurrent processing, and works well with ArcPy? If so, does ESRI have a "help page" to show users how to perform these kind of workflows?&amp;nbsp;&lt;/STRONG&gt;For example, last week I ran an origin-destination travel-time matrix&amp;nbsp;for all hospitals in US to every Census Block Group Centroid within 2.5 hours. To get the data to process below the computing capacity of the PC I was using, I had 15 separate Python files that looped through the block groups within each county and did the following: 1) created an o-d matrix layer, 2) add destination locations, 3) add origin locations of Block Groups within a county, 4) solved the model, 5) export/append the "lines" layer to a table in a database, 6) truncate the origin and lines layers, 7) and repeat steps 3-6 for the Block Groups in the next&amp;nbsp;county.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though solutions like this gets the job done for me, at times it can be kind of an headache to manage the concurrent processing of 10+ separate python files. I feel like that there's got to be a better solution out there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice is welcomed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2020 18:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/in-python-what-is-the-best-library-to-do-parallel/m-p/740476#M57268</guid>
      <dc:creator>DwightLewis3</dc:creator>
      <dc:date>2020-07-07T18:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: In Python, what is the best library to do parallel or concurrent processing of GIS workflows?</title>
      <link>https://community.esri.com/t5/python-questions/in-python-what-is-the-best-library-to-do-parallel/m-p/740477#M57269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awhile back i had helped someone by making this gist. Its&amp;nbsp;using the multiprocessing library to do parallel calculations on a data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is generally the setup i use, specifically queue based so you are always trying to let every process pull a value from a shared pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gist.github.com/namur007/e17ccbb1aafe230774fb49add4badd34" title="https://gist.github.com/namur007/e17ccbb1aafe230774fb49add4badd34"&gt;Multiprocessing ArcGIS/Arcpy · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i recall i had changed it slightly to not use queue.empty and just wrapped it in a try:catch: instead to avoid&amp;nbsp;some other issues. that one doesn't show it, but it's easy to modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feel free to ask if you have any questions on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/namur007/arcpy_multiprocessing_template/tree/master/Toolbox/code" title="https://github.com/namur007/arcpy_multiprocessing_template/tree/master/Toolbox/code"&gt;arcpy_multiprocessing_template/Toolbox/code at master · namur007/arcpy_multiprocessing_template · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one should have the proper logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2020 20:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/in-python-what-is-the-best-library-to-do-parallel/m-p/740477#M57269</guid>
      <dc:creator>CodyScott</dc:creator>
      <dc:date>2020-07-07T20:11:44Z</dc:date>
    </item>
  </channel>
</rss>

