<?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: Spatial Autocorrelation with rasters in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222125#M703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The attached zip file contains an aml that will return the Moran's-I coefficient using either a Rook or Queen's case. It runs in Workstation ArcInfo Grid. I cannot perform this analysis in ArcMap because there is nothing equivalent to a DOCELL in Spatial Analyst. I also have code that will calculate Geary's-C.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Dec 2010 00:08:47 GMT</pubDate>
    <dc:creator>JeffreyEvans</dc:creator>
    <dc:date>2010-12-08T00:08:47Z</dc:date>
    <item>
      <title>Spatial Autocorrelation with rasters</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222124#M702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hallo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone tell me a procedure to get a spatial autocorrelation based on gridcells. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the morans autocorrelation for a raster dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The formula or equation is clear for me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the core problem is now to calculate the cross product for a defined neighborhood. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The goal is to calculate local morans autocorrelation values for every grid cell. I guess, this is not easy as it sounds. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My consideration was to calculate all the values from the focal statistics. The variance and summed weighted values, which are needed in the morans calculation are no problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the cross product in the numerator make some difficulties. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found no solution to get the cross product for a 3x3 neighborhood or higher. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Holm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 23:35:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222124#M702</guid>
      <dc:creator>HolmSeifert</dc:creator>
      <dc:date>2010-12-07T23:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Autocorrelation with rasters</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222125#M703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The attached zip file contains an aml that will return the Moran's-I coefficient using either a Rook or Queen's case. It runs in Workstation ArcInfo Grid. I cannot perform this analysis in ArcMap because there is nothing equivalent to a DOCELL in Spatial Analyst. I also have code that will calculate Geary's-C.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 00:08:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222125#M703</guid>
      <dc:creator>JeffreyEvans</dc:creator>
      <dc:date>2010-12-08T00:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Autocorrelation with rasters</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222126#M704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It runs in Workstation ArcInfo Grid. I cannot perform this analysis in ArcMap because there is nothing equivalent to a DOCELL in Spatial Analyst.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For the most part, the equivalent to DOCELL is Map Algebra/Raster Calculator. It's the ability to use neighborhood notation that is missing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With ArcGIS 10, you could &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000012z000000.htm"&gt;convert your raster to a Numpy array&lt;/A&gt;&lt;SPAN&gt; and do the calculations that way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, you could just convert your raster to points or polygons, couldn't you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 20:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222126#M704</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2010-12-08T20:19:49Z</dc:date>
    </item>
    <item>
      <title>Spatial Autocorrelation with rasters new concept</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222127#M705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hallo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First thanks to all the people who wrote a reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;1) Jeffrey Evans,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your aml file. Unfortunately i do no have a arcinfo workstation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So i have to perform / create this analysis in arcgis itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;2) Phil Morefield,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure this would be a solution to run a morans analysis in python. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Converting to points is no problems. But my task is to solve such a operation with grid cells. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The reasons are due to many thematic maps existing in raster format. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;3) William Huber&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your very detailled solution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have some question. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But before i start i will provide a simple example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let´s imagine a simple 3x3 grid with a indicator transformation to 1 or 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had done this before with my rasters. This looks like &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0 1 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0 0 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For a better understanding i will give names to every cell.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a b c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;d e f&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g h i&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My weight w(ij) looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0.5&amp;nbsp; 0.5&amp;nbsp; 0.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0.5&amp;nbsp; 1.0&amp;nbsp; 0.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0.5&amp;nbsp; 0.5&amp;nbsp; 0.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok no i want to calculate the morans&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So every gridcell should have its own morans. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"I" stands for morans between -1 and +1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The result should be like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ia Ib Ic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Id Ie If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ig Ih Ii&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have studied your equation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is an gdb geodatabase and a weighted kernel. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Big letters explains the source or intermediate results and small letters are the operators.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TestGrid is the base. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok lets beginn. Here are the grids.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;I Denumerator&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Denumerator1_Variance" = is the focal (3x3) variance of the values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Denumerator2_Variance_times_DoubleSumWeights" = is the product of "Denumerator1_Variance" and the Doublesum of the 3x3 weight. The doublesum of the weight is 10 (weight matrix above)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the denumerator is solved. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now the numerator. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;II Numerator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Numerator1_focalXj" = is the Sum over all neighboring gridcells from exactly one center cell with the weights / weightmatrix.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Numerator2_FocalXj_minus_X = is the subtraction of the value normal x-value from the "Numerator1_FocalXj" grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Numerator3_Numerator2_product_TestGrid = is the product of the "Numerator2_FocalXj_minus_X" grid and the normal "TestGrid"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Numerator4_focal_Numerator3" = is the FocalSum of the "Numerator3_product_Numerator2" grid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;!!!I used here a focal sum Willima instead of a zonal sum, because i want the morans for every grid cell in a 3x3 neighborhood. i think this should be the correct procedure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Numerator5_Numerator4_times_8" = is the product of the "Numerator4_focal_Numerator3" grid and the number of neighbors, here 8 neighbors. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So we have the numerator. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/images/icons/icon6.png"&gt;http://forums.arcgis.com/images/icons/icon6.png&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;III Divide&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The last calculation is: Numerator / Denumerator&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Divide" = "Numerator4_focal_Numerator3" grid divide by the "Denumerator2_Variance_times_DoubleSumWeights" grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this should be the endresult. For me it looks ok. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please test and write me back. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Holm&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 18:29:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222127#M705</guid>
      <dc:creator>HolmSeifert</dc:creator>
      <dc:date>2010-12-10T18:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Autocorrelation with rasters</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222128#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As I mentioned previously ArcGIS is capable of cell-by-cell calculations, but the "neighborhood notation" available in ArcInfo no longer exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't followed the necessary calculations in detail, but it seems like some combination of &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000qp000000.htm"&gt;Block Statistics&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000qs000000.htm"&gt;Focal Statistics&lt;/A&gt;&lt;SPAN&gt; should also work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, in ArcGIS 10 &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/An_overview_of_neighborhood_classes/005m0000001p000000/"&gt;neighborhood clases&lt;/A&gt;&lt;SPAN&gt; (e.g. rectange, wedge, circle) can be defined explicitly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 18:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/spatial-autocorrelation-with-rasters/m-p/222128#M706</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2010-12-29T18:55:10Z</dc:date>
    </item>
  </channel>
</rss>

