<?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: retrieve raster statistics and export to an .xls  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666305#M51729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/get-raster-properties.htm"&gt;&lt;STRONG&gt;Get Raster Properties&lt;/STRONG&gt;&lt;/A&gt;..&lt;/P&gt;&lt;P&gt;returns a result object, but what is your code that provides the shell around dealing with the result and putting it into a format that you can use for Table to Excel ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2018 16:06:00 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-05-22T16:06:00Z</dc:date>
    <item>
      <title>retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666304#M51728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to retrieve minimum, maximum, mean, and standard deviation statistical values from a directory of raster files and store the values in an excel spreadsheet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My approach as been cursors and GetRasterProperties_management.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 15:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666304#M51728</guid>
      <dc:creator>HeatherHook</dc:creator>
      <dc:date>2018-05-22T15:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666305#M51729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/get-raster-properties.htm"&gt;&lt;STRONG&gt;Get Raster Properties&lt;/STRONG&gt;&lt;/A&gt;..&lt;/P&gt;&lt;P&gt;returns a result object, but what is your code that provides the shell around dealing with the result and putting it into a format that you can use for Table to Excel ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 16:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666305#M51729</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-22T16:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666306#M51730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a very good question. I was using a text document file with each object separated by a coma space.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 16:19:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666306#M51730</guid>
      <dc:creator>HeatherHook</dc:creator>
      <dc:date>2018-05-22T16:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666307#M51731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually I was referring to the code that cycles through the rasters and uses the tools's arcpy code access to get the stats.&amp;nbsp; Or do you not have that bit yet? since you refer to cursors&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 16:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666307#M51731</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-22T16:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666308#M51732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for loop. but I really haven't gotten that bit to work properly yet.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 16:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666308#M51732</guid>
      <dc:creator>HeatherHook</dc:creator>
      <dc:date>2018-05-22T16:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666309#M51733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i really feel like there is a more efficient approach I just have no idea what it could be.&amp;nbsp; I also thought there would already be an existing tool for this objective but my searches have come up empty handed.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 16:49:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666309#M51733</guid>
      <dc:creator>HeatherHook</dc:creator>
      <dc:date>2018-05-22T16:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve raster statistics and export to an .xls</title>
      <link>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666310#M51734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did something similar the other day. Instead of keeping it all inside GIS, I did a standalone script and exported from the script to a .txt file, which I then imported in Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The iterating and printing part of the script looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!/usr/bin/env python&lt;BR /&gt;# -*- coding: utf-8 -*-&lt;/P&gt;&lt;P&gt;import arcpy, os, sys, string, glob&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;shpWS = "E:\MidlGIS\I7010"&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = shpWS&lt;/P&gt;&lt;P&gt;shplist = arcpy.ListFeatureClasses()&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;print (len(shplist))&lt;/P&gt;&lt;P&gt;for fc in shplist:&lt;BR /&gt;&amp;nbsp;count = arcpy.GetCount_management(fc)&lt;BR /&gt;&amp;nbsp;ord = fc&lt;BR /&gt;&amp;nbsp;ord = ord[6:]&lt;BR /&gt;&amp;nbsp;ord = ord[:-4]&lt;BR /&gt;&amp;nbsp;print fc[1:5]+"____"+ ord +'____'+str(count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 07:15:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/retrieve-raster-statistics-and-export-to-an-xls/m-p/666310#M51734</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-23T07:15:17Z</dc:date>
    </item>
  </channel>
</rss>

