<?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 decrease density of points in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726780#M56371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I have a point feature class with about 1 million points that are spread one meter apart each, how can I EVENLY reduce the density of these points by about an order of magnitude?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried selecting every 10th record, but this did not evenly select the points spatially.&amp;nbsp; Some areas were denser with points than others despite the total number of points selected being correct.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how I selected every 10th point :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.SelectLayerByAttribute_management("PointsFC","NEW_SELECTION","""MOD( "pointid",10) = 0""")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can sombody tell me a method to do this spatially rather than just using the sequential pointid field?&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 18:32:06 GMT</pubDate>
    <dc:creator>JustinWhisenant</dc:creator>
    <dc:date>2014-02-19T18:32:06Z</dc:date>
    <item>
      <title>decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726780#M56371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I have a point feature class with about 1 million points that are spread one meter apart each, how can I EVENLY reduce the density of these points by about an order of magnitude?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried selecting every 10th record, but this did not evenly select the points spatially.&amp;nbsp; Some areas were denser with points than others despite the total number of points selected being correct.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how I selected every 10th point :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.SelectLayerByAttribute_management("PointsFC","NEW_SELECTION","""MOD( "pointid",10) = 0""")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can sombody tell me a method to do this spatially rather than just using the sequential pointid field?&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:32:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726780#M56371</guid>
      <dc:creator>JustinWhisenant</dc:creator>
      <dc:date>2014-02-19T18:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726781#M56372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are your original points evenly spatially distributed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could randomly take a subset of points, but that wouldn't be evenly distributed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively, you could convert your points to a grid (something like &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00120000002z000000"&gt;point to raster&lt;/A&gt;&lt;SPAN&gt;) and then convert the raster back to points (&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000007000000"&gt;raster to point&lt;/A&gt;&lt;SPAN&gt;). You would have to play with the cell size to make sure you got the right number of raster cells (which would be converted back to points). This method would mean you have a new set of points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if that is at all sufficient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 19:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726781#M56372</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2014-02-19T19:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726782#M56373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are your original points evenly spatially distributed?&lt;BR /&gt;&lt;BR /&gt;You could randomly take a subset of points, but that wouldn't be evenly distributed.&lt;BR /&gt;&lt;BR /&gt;Alternatively, you could convert your points to a grid (something like &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00120000002z000000"&gt;point to raster&lt;/A&gt;) and then convert the raster back to points (&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000007000000"&gt;raster to point&lt;/A&gt;). You would have to play with the cell size to make sure you got the right number of raster cells (which would be converted back to points). This method would mean you have a new set of points.&lt;BR /&gt;&lt;BR /&gt;Let me know if that is at all sufficient.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These points originally came from a DEM that gets reprojected before being converted to points.&amp;nbsp; I could change the output cell size when projecting (Is bilinear best for this?).&amp;nbsp; I was, however, hoping to find a way to select a subset of points based on an even spatial distribution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 19:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726782#M56373</guid>
      <dc:creator>JustinWhisenant</dc:creator>
      <dc:date>2014-02-19T19:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726783#M56374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, this might be a little sloppy, but you could take the resulting points FC (from the raster to point tool) and use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00080000001q000000"&gt;near&lt;/A&gt;&lt;SPAN&gt; tool on it. Then each of your points (on a perfect grid) would find the nearest point form your original points. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You would then have to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000064000000"&gt;join&lt;/A&gt;&lt;SPAN&gt; the points from the grid (with appended nearest point information) to the original points (NEAR_FID to FID). Make sure you only keep matching records (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;join_type="KEEP_COMMON"&lt;/SPAN&gt;&lt;SPAN&gt;) or you'll end up right where you started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if that made any sense.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 19:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726783#M56374</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2014-02-19T19:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726784#M56375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh man, I like that.&amp;nbsp; Unfortunately, I have Desktop Standard not Advanced, so I cannot use the Near tool.&amp;nbsp; I cannot believe this is not part of the Spatial Analyst extension.&amp;nbsp; How much money does it take esri?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 19:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726784#M56375</guid>
      <dc:creator>JustinWhisenant</dc:creator>
      <dc:date>2014-02-19T19:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726785#M56376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You might consider just calculating a new centre X &amp;amp; Y for your new cell size like :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
CentX = int(X / NewCellSize) * NewCellSize + NewCellSize / 2
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;ditto for the Y. Then you could summarise your data across these new XY's. Get the average of all the input points or something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726785#M56376</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2021-12-12T07:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: decrease density of points</title>
      <link>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726786#M56377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Justin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are free and open source alternatives to ESRI's near tool (see &lt;/SPAN&gt;&lt;A href="http://osgeo-org.1560.x6.nabble.com/QGIS-quot-Near-quot-td4135417.html"&gt;this forum&lt;/A&gt;&lt;SPAN&gt;). I've played around a bit with open source before. It takes a long time to learn to use to the environment and figure out the tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck either way!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 12:50:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/decrease-density-of-points/m-p/726786#M56377</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2014-02-20T12:50:00Z</dc:date>
    </item>
  </channel>
</rss>

