<?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: raster cell alignment in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/raster-cell-alignment/m-p/234636#M18189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rasters cells are aligned by specifying a 'snap raster' in the environment settings for tools in arctoolbox that support it... like Copy Raster and many more.&lt;/P&gt;&lt;P&gt;Cell size, extent and snap raster will need to be all done and considered if you want to ensure alignment of your raster products.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/snap-raster.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/snap-raster.htm"&gt;Snap Raster (Environment setting)—Geoprocessing | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Feb 2019 05:20:38 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-02-09T05:20:38Z</dc:date>
    <item>
      <title>raster cell alignment</title>
      <link>https://community.esri.com/t5/python-questions/raster-cell-alignment/m-p/234635#M18188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to be able to confirm if raster cells are aligned and GP tools use the snap raster environment.&amp;nbsp; I have experienced quite a variety of results.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current workflow has 6 rasters with the same spatial reference and cell resolution.&amp;nbsp; To confirm the cells are aligned would save a considerable amount of time by not having to look at all 6 rasters at once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing I have used the following steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a fishnet from the extent of the first raster &amp;gt; select by location using a polygon representation of the rasters where the centroid of the fishnet feature is within the underlying polygon &amp;gt; switch selection and delete all of the fishnet features that do not overlap the polygon &amp;gt; using a search cursor and the python random module select 3 test areas.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;Extract each raster using the sample fishnet features one at a time&lt;/P&gt;&lt;P&gt;3. Convert those to points in order to have a center of the raster cell vector representation.&lt;/P&gt;&lt;P&gt;4. Merge the points and then remove duplicates.&lt;/P&gt;&lt;P&gt;5. Check results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be wrong but I would think if all the cells were aligned the points would have to be identical and have the same coordinates.&amp;nbsp; The code works and I do get points but I would like for the resulting point feature class to be empty.&amp;nbsp; To me if the feature class is empty then all of the points are in the exact same place so I could get the attributes as a list/tuple or other container.&amp;nbsp; Then the check would be if not attribute_list: pass else: fail.&amp;nbsp; I thought that asking about this would help give me perspective and consider other solutions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I do not have the code in front of me as I am at home.&amp;nbsp; If someone takes an interest in this post I would be more than happy to share.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James L. Huffines&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 04:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-cell-alignment/m-p/234635#M18188</guid>
      <dc:creator>JamesHuffines</dc:creator>
      <dc:date>2019-02-09T04:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: raster cell alignment</title>
      <link>https://community.esri.com/t5/python-questions/raster-cell-alignment/m-p/234636#M18189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rasters cells are aligned by specifying a 'snap raster' in the environment settings for tools in arctoolbox that support it... like Copy Raster and many more.&lt;/P&gt;&lt;P&gt;Cell size, extent and snap raster will need to be all done and considered if you want to ensure alignment of your raster products.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/snap-raster.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/snap-raster.htm"&gt;Snap Raster (Environment setting)—Geoprocessing | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 05:20:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-cell-alignment/m-p/234636#M18189</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-09T05:20:38Z</dc:date>
    </item>
  </channel>
</rss>

