<?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: select random points in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/1212210#M26470</link>
    <description>&lt;P&gt;Or select by location using the new feature as the intersecting feature!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 21:46:59 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-09-13T21:46:59Z</dc:date>
    <item>
      <title>select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331811#M11650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey all!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have sounding data with tens of thousands of points per feature. I need to reduce the points significantly in density, and was hoping there was a way to randomly select points through an arcmap tool. While the create random points tool does what I need, it does not seem to maintain the attribute data (eg. depth) that I need with each point. Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 03:19:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331811#M11650</guid>
      <dc:creator>LoriEpstein</dc:creator>
      <dc:date>2014-01-31T03:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331812#M11651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the Create Random Points tool does just that: creates new points randomly, rather than selecting existing points randomly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try adding a new field to your existing points, then calculating a random 1 or 0 for each point, then just select out the 1s. I think it could still be a bit random how many 1s you get though, it might not reduce the points by much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there was a certain factor you wanted to reduce the data by, and as long as the OBJECT_IDs aren't sorted in any way, you could calculate a modulo in your field, e.g. to just pick out every 10th point, you'd calculate OBJECT_ID % 10 (which would give you the remainder left if you divided the OBJECT_ID by 10) and select all the 0s in that field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that makes sense, if not let me know and I will try to explain better!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331812#M11651</guid>
      <dc:creator>DanEvans</dc:creator>
      <dc:date>2014-01-31T10:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331813#M11652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//003000000012000000"&gt;Subset Features&lt;/A&gt;&lt;SPAN&gt; is designed to do that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 11:35:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331813#M11652</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2014-01-31T11:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331814#M11653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;free&lt;/SPAN&gt;&lt;SPAN&gt; tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=ecbe1fc44f35465f9dea42ef9b63e785"&gt;http://www.arcgis.com/home/item.html?id=ecbe1fc44f35465f9dea42ef9b63e785&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=f7289cfc69204aa688e8c7c739fc0901"&gt;http://www.arcgis.com/home/item.html?id=f7289cfc69204aa688e8c7c739fc0901&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 11:38:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331814#M11653</guid>
      <dc:creator>michaelcollins1</dc:creator>
      <dc:date>2014-01-31T11:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331815#M11654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//003000000012000000"&gt;Subset Features&lt;/A&gt; is designed to do that.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*** Requires Geostatistical Analyst ***&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 11:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331815#M11654</guid>
      <dc:creator>michaelcollins1</dc:creator>
      <dc:date>2014-01-31T11:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331816#M11655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This code will populate an existing attribute with a random number.&amp;nbsp; Run the script.&amp;nbsp; Then, for example, select values less than 0.2 to select about 20% of your points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Populates an existing attribute with a randomly generated value 

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; import operator, os, random, traceback, sys, arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Adding random numbers to an existing attribute.")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Copyright 2011, Gerry Gabrisch, gerry@gabrisch.us")

&amp;nbsp;&amp;nbsp;&amp;nbsp; #Path to the feature class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = arcpy.GetParameterAsText(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; #The Attribute to populate...
&amp;nbsp;&amp;nbsp;&amp;nbsp; attribute = arcpy.GetParameterAsText(1)
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; uc = arcpy.UpdateCursor(fc)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in uc:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = random.random()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(attribute, x)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Done")
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
except arcpy.ExecuteError: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = arcpy.GetMessages(2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(msgs)
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; tbinfo = traceback.format_tb(tb)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(pymsg)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(pymsg + "\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(msgs)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:42:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/331816#M11655</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2021-12-11T15:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/1174219#M26333</link>
      <description>&lt;P&gt;I'm guessing you're eight years beyond needing an answer to this question. But here is some more info: In ArcGIS Pro 2.8, you can use the Create Random Points tool to select a subset, using your original point feature class as the "Constraining Feature Class". The attributes are not preserved in the output as you note; however, you can join via the CID field, matching to the OID in the original data source.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 15:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/1174219#M26333</guid>
      <dc:creator>FourCornersMapping</dc:creator>
      <dc:date>2022-05-16T15:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: select random points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/1212210#M26470</link>
      <description>&lt;P&gt;Or select by location using the new feature as the intersecting feature!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 21:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/select-random-points/m-p/1212210#M26470</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-09-13T21:46:59Z</dc:date>
    </item>
  </channel>
</rss>

