<?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: 5 million Point buffer analysis in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401135#M31581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that is the point I am not clear on...you say you have 5 million points that you want to buffer and then you want to do a spatial query with 5 million other(?) buffers?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where are those buffers?&lt;/LI&gt;&lt;LI&gt;what is the purpose of the buffer?&lt;/LI&gt;&lt;LI&gt;are you looking for some kind of density map? or a proximity map?&lt;/LI&gt;&lt;LI&gt;do you have access to the spatial analyst?&lt;/LI&gt;&lt;LI&gt;can you show an example using a smaller data set of what you are trying to do since the problem needs clarification&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Dec 2015 00:53:47 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-12-26T00:53:47Z</dc:date>
    <item>
      <title>5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401132#M31578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 5 million points and I would like to generate buffer and find the points that falls in each buffer region and perform some calculation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with Spatial join and getting out of memory exception and finally I am trying with Multiprocessing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know, Is there any other way we can do this more efficiently in python or any other method. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Dec 2015 14:53:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401132#M31578</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2015-12-25T14:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401133#M31579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how many buffers? the obvious thing would be to spatially tile your data since it will be apparent which points can possibly fall within each buffer.&amp;nbsp; multiprocessing, hadoop ( &lt;A href="https://esri.github.io/#Python" title="https://esri.github.io/#Python"&gt;Esri GitHub | Open Source and Example Projects from the Esri Developer Platform&lt;/A&gt; ) will probably not be the way to go, since the problem needs to be formed within a different spatial context&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Dec 2015 15:39:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401133#M31579</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-25T15:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401134#M31580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, thanks for the quick reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the sample image,&amp;nbsp; The layer has 5Million points and i have to generate 5 Million buffers. After Generating buffer i have to perform spatial query similar point layer which has same amount of data. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Points.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/160540_Points.jpg" style="width: 620px; height: 507px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 00:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401134#M31580</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2015-12-26T00:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401135#M31581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that is the point I am not clear on...you say you have 5 million points that you want to buffer and then you want to do a spatial query with 5 million other(?) buffers?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where are those buffers?&lt;/LI&gt;&lt;LI&gt;what is the purpose of the buffer?&lt;/LI&gt;&lt;LI&gt;are you looking for some kind of density map? or a proximity map?&lt;/LI&gt;&lt;LI&gt;do you have access to the spatial analyst?&lt;/LI&gt;&lt;LI&gt;can you show an example using a smaller data set of what you are trying to do since the problem needs clarification&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 00:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401135#M31581</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-26T00:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401136#M31582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at kernel density &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/kernel-density.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/kernel-density.htm"&gt;Kernel Density—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;point density &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/point-density.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/point-density.htm"&gt;Point Density—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;optimized hotspot &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-statistics-toolbox/optimized-hot-spot-analysis.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/spatial-statistics-toolbox/optimized-hot-spot-analysis.htm"&gt;Optimized Hot Spot Analysis—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 01:05:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401136#M31582</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-26T01:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401137#M31583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;I am performing proximity overlay analysis to find the points within circle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample senario, I would like to find the houses that are around my restaurant using 100 mile buffer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per below image:&lt;/P&gt;&lt;P&gt;Green color point is my restaurant and brown color points are houses.&lt;/P&gt;&lt;P&gt;I have performed proximity analysis to find the houses around my restaurant in 100 mile radius.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on 100 mile radius buffer i will select the house and perform some additional calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/161025_pastedImage_4.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I am able to perform this analysis successfully with around 2 Million data using spatial join.&amp;nbsp; &lt;/P&gt;&lt;P&gt;the problem is when I try to execute this analysis with 5 million data i am facing out of memory exception.&amp;nbsp; Is there any other option to perform this proximity analysis more efficiently in large data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 06:10:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401137#M31583</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2015-12-26T06:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401138#M31584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first, since you can see your buffer, you could do one of the following&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;roughly draw a rectangle around your buffer using the selection tool to select the points that are within your buffer zone... selections are used when using most tools in ArcToolbox.&amp;nbsp; That will limit the candidate sites.&lt;/LI&gt;&lt;LI&gt;you could perform the same selection and save the results to a new file for further analysis&lt;/LI&gt;&lt;LI&gt;you seem to be interested in euclidean distance and not network distance so that further simplifies the analysis.&lt;/LI&gt;&lt;LI&gt;you can simply perform a select by spatial location using the previously rectangular area points using them as the target and the buffer circle as the selector.&amp;nbsp; This will give you all the points that are within the buffer circle&lt;/LI&gt;&lt;LI&gt;if you are really stuck on the idea of doing distance measurements, then determine the points that are within the buffer radius distance using numpy &lt;A href="https://community.esri.com/migration-blogpost/55171"&gt;Before I forget ... # 16 ... NumPy vs SciPy... making a point&lt;/A&gt; this is extreme overkill and not needed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In short... don't rely solely on the software to solve the problem...human brain intervention often simplifies problems to acceptable levels...since you can see the points that are within the buffer...select them roughly, then fine-tune the selection using arctoolbox tools...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;select by spatial location in the analysis,distance toolset &lt;UL&gt;&lt;LI&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/select-layer-by-location.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/select-layer-by-location.htm"&gt;Select Layer By Location—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;the Point distance or Near tool if you have the advanced license&lt;UL&gt;&lt;LI&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/point-distance.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/point-distance.htm"&gt;Point Distance—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/near.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/near.htm"&gt;Near—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;or numpy, as per the solution in the link I provided.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So.... &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;limit your candidate sites in a quasi-interactive way or use tools which can handle large point masses,&amp;nbsp; numpy can be used to substitute for tools that you don't have the necessary license for&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 08:11:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401138#M31584</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-26T08:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401139#M31585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to the previous long post...other aspects to consider&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;what makes you think that people from 100 miles around are going to your restaurant as their primary destination?&amp;nbsp; Perhaps, the target radius is too big. have you performed any analysis on-site that indicates that "people are coming from miles around"... and if so, how many?&lt;/LI&gt;&lt;LI&gt;the target audience within a 100 mile buffer may bear no resemblence to those within the immediate neighbourhood of your restaurant. Are the socio-economic conditions uniform within the landscape?&amp;nbsp; Will they all likely have the ability to dine out? are they willing to travel large distances?&lt;/LI&gt;&lt;LI&gt;You are only considering euclidean distance currently... a good first step, however, the actual travel distance by road can be a totally different story.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So these non-distance characteristics can be further used to limit the candidates for the study, pruning them down by attribute and by spatial location making the problem more manageable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 08:28:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401139#M31585</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-26T08:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401140#M31586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the reply. I have already tried to limit the candidate using following approaches&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -used Fishnet (To find buffer regions)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Creating bounding box around the circle &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Find an Identical location (to eliminate duplicate points(locations))&lt;/P&gt;&lt;P&gt;Currently, I am trying to find the points using &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/generate-near-table.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/generate-near-table.htm"&gt;Generate Near Table—Help | ArcGIS for Desktop&lt;/A&gt; Because it supports finding the more than one near features. &lt;/P&gt;&lt;P&gt;I am currently using arcpy.da.TableToNumPyArray&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/tabletonumpyarray.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/data-access/tabletonumpyarray.htm"&gt;TableToNumPyArray—Data Access module | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; to store the results in a separate table. &lt;/P&gt;&lt;P&gt;The use case which i explained was a sample one and we have similar different use cases with reasonable use stories.I will try all your above suggestions to restrict the points and will post the update once I am done.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 13:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401140#M31586</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2015-12-26T13:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401141#M31587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after limiting the candidates either method should work.&amp;nbsp; The numpy approach with calculating the distances can be completed using a np.where statement querying for only those locations that have a distance less than your threshold distance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Dec 2015 15:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401141#M31587</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-26T15:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401142#M31588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The tool 'Generate Near Table' (BTW: only available at the ArcInfo license level) would also work for something like this... Basically it builds a distance-based one-to-many association table. A warning that the resulting output table is often many orders of magnitude larger than the number of input features - the explanation being that one house can be within 100 miles of &lt;SPAN style="text-decoration: underline;"&gt;many&lt;/SPAN&gt; different restaurants. &lt;SPAN style="text-decoration: underline;"&gt;Be sure to apply a search radius&lt;/SPAN&gt;! As a experiment, you might 1st apply a very small search radius (&amp;lt; 1 mile) so as to see the format of the output data you will be dealing with.... before you accidently end up with an output table that is 300 million records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are running out of RAM, consider installing the 64-bit background geoprocessor: &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/executing-tools/64bit-background.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/executing-tools/64bit-background.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Background Geoprocessing (64-bit)—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure exactly what you are doing here, but I think initially if I were doing this in a script, I would just loop through the restaurants, and select the houses, gather their stats, and write out some result. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;foodPnts = r"C:\temp\test.gdb\restaurants"
housePnts = r"C:\temp\test.gdb\houses"
arcpy.MakeFeatureLayer_management(housePnts, "fl")
searchRows = arcpy.da.SearchRows(foodPnts, ["SHAPE@", "RESTAURANT_ID"])
for searchRow in searchRows:
&amp;nbsp; shapeObj, restaurantId = searchRow
&amp;nbsp; arcpy.SelectLayerByLocation_management("fl", "INTESECT", shapeObj, "100 MILES")
&amp;nbsp; recordCount = int(arcpy.GetCount_management("fl").getOutput(0))
&amp;nbsp; print("There are " + str(recordCount) + " houses within 100 miles of restaurant #" + str(restaurantId))
&amp;nbsp; #using the selected features/records in "fl", you now have a hook so as to get their names, incomes, etc.
&amp;nbsp; #blah, blah...
del searchRow, searchRows&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401142#M31588</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T18:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401143#M31589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, Chris,&lt;/P&gt;&lt;P&gt;The scenario which I explained in my previous post was example scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using following code to find the customer within 200-mile radius from&amp;nbsp; our distribution center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It took almost 2 hr to analyse 250 distribution center points against 0.4 Millon customer locations. Is there anyway we can improve the performance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

DC_Points = r"C:\temp\TestGDB1.gdb\DistributionSites"&amp;nbsp; 
CL_Points = r"C:\temp\TestGDB1.gdb\CustomerLoaction"&amp;nbsp; 
fcSumPoint=r"C:\temp\TestGDB1.gdb\fcSumPoint"
&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;arcpy.MakeFeatureLayer_management(CL_Points, "cl_points")&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;
searchRows = arcpy.da.SearchCursor(DC_Points, ["SHAPE@", "site_id","cov1val"])
print("searchcursor")
fields=("SHAPE@","dc_Id","cl_count","acSum")
inCursor = arcpy.da.InsertCursor(fcSumPoint, fields)
print("insert cursor")
for searchRow in searchRows: 
&amp;nbsp; shapeObj,dc_id,AcSUm = searchRow
 buffSelectionLyr=arcpy.SelectLayerByLocation_management("cl_points", "INTERSECT", shapeObj, "20 MILES","NEW_SELECTION")&amp;nbsp; 
&amp;nbsp; recordCount = int(arcpy.GetCount_management("cl_points").getOutput(0)) 
&amp;nbsp; sumValues = 0 
&amp;nbsp; sumValues += AcSUm
 print(siteid,recordCount,sumValues)
 infiled=[shapeObj,siteid,recordCount,sumValues]
 inCursor.insertRow(infiled)
&amp;nbsp; print("There are " + str(recordCount) + " points in #" + str(siteid)) 
&amp;nbsp; #using the selected features/records in "flyou now have a hook so as to get their names, incomes, etc.&amp;nbsp; 
del searchRow, searchRows, inCursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401143#M31589</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2021-12-11T18:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401144#M31590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not bad...unless you have to do it daily... If you have lots of memory (ie 16-32 Gig) and ArcGIS Pro, why don't you benchmark it in that since, it should run without alteration in that environment.&amp;nbsp; It would be an interesting comparison.&amp;nbsp;&amp;nbsp; You are using the Python 3.4.x version of the print statement already, which is good, and I can't see anything else that would cause fault in the next python as well&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;P&gt;print("some stuff {} plus more stuff {}".format(first_stuff,second_stuff))&lt;/P&gt;&lt;P&gt;takes care of type conversion the { } brackets are sequential.&amp;nbsp; See Python's mini-formatting language for more details or one of my blogs on formatting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 20:18:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401144#M31590</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-29T20:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401145#M31591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to run the analysis on daily and it is taking more time (for 95000 points it took almost 9 hrs). I will try with ArcGIS Pro. &lt;/P&gt;&lt;P&gt;one more question, Is there any other way to we can improve the performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 23:41:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401145#M31591</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2016-01-01T23:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401146#M31592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As indicated previously, you will have to narrow your search from all the locations to those just near the point-buffer you are looking at.&amp;nbsp; You won't be able to do all for all at once within an arcmap environment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 00:28:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401146#M31592</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-02T00:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401147#M31593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am executing the script as a batch process. I have tried to minimise the candidates, but still it is huge data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 00:37:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401147#M31593</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2016-01-02T00:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401148#M31594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you will need to prune your data set based on some criteria.&amp;nbsp; We still don't know exactly what you are doing and why you need every site within your buffer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 00:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401148#M31594</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-02T00:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401149#M31595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each candidate in the buffer zone has its own statistical value. So, I have to find all candidates in given buffer, get each candidate value and perform additional statistical calculation like sum. It is points within polygon analysis. the only problem which I am facing is performance and out of memory issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 04:48:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401149#M31595</guid>
      <dc:creator>GaneshmoorthiM</dc:creator>
      <dc:date>2016-01-02T04:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401150#M31596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to delimit the candidates whose values change.&amp;nbsp; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Step 1 would be to take a snapshot and determine the "value" for each candidate at a point in time.&amp;nbsp; That is your benchmark. Do the long hard work of deriving he benchmarks for the buffers.&amp;nbsp; This is easyto do.&amp;nbsp; You could obtain millions of values in microseconds using arcpy and/or numpy (see my previous posts).&lt;/LI&gt;&lt;LI&gt;Step 2 get the statistical parameter for all candidates at time step 2.&amp;nbsp; Ditto on the quick thing.&lt;/LI&gt;&lt;LI&gt;Step 3 determine the candidates that changed... a simple difference... incredibly fast&lt;/LI&gt;&lt;LI&gt;perform your buffer query on only the candidates in step 3 ... should be fast for all buffers since your candidates of interest are now greatly reduced.&lt;/LI&gt;&lt;LI&gt;final step, take the changes per buffer and apply them to the benchmark&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So if your buffer size and locations remain the same, the problem can be greatly reduced to a smaller set by only querying for the 'changelings' after your benchmark conditions are determined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2016 05:19:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401150#M31596</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-02T05:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: 5 million Point buffer analysis</title>
      <link>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401151#M31597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, there is a way to improve performance... Like Dan mentioned, don't use ArcGIS (directly at least).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is another approach leveraging Python dictionaries. Note that this code only works for planar coordinates (UTM, State Plane, etc.) so if your data is in Geographic coordinates you need to use another distance function! BTW: This code assumes all fields are fully populated with valid values - if not you'll have to handle those exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Numpy has some nice ways to do all this stuff too - I usually prefer to roll my own though &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import math
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;def getDist(x1, y1, x2, y2):&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp; return math.sqrt((x1-x2)**2 + (y1-y2)**2)&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;sitesDict = {r[0],r[1]:r[2:] for r in arcpy.da.SearchCursor(sitesFC, ["SHAPE@X","SHAPE@Y","RESTAURANT_ID"])}&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;customersDict = {r[0],r[1]:r[2:] for r in arcpy.da.SearchCursor(custFC, ["SHAPE@X","SHAPE@Y","INCOME"])}&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;for x1, y1 in sitesDict:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp; incomeList = []&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp; for x2, y2, in customersDict:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if getDist(x1, y1, x2, y2) &amp;lt;= 1000: #or whatever map unit theashold...&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; income = customersDict[(x2, y2)][0])&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if income &amp;gt; 0:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; incomeList.append(customersDict[(x2, y2)][0])&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #blah&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp; incomeListSum = sum(incomeList)&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp; incomeListLen = len(incomeList)&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&amp;nbsp; print ("Restaurant #" + str(sitesDict[(x1,y1)][0] + " has " + str(incomeListLen) + " customers - average income is " = str(incomeListSum / float(incomeListLen)))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/5-million-point-buffer-analysis/m-p/401151#M31597</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T18:18:08Z</dc:date>
    </item>
  </channel>
</rss>

