<?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: arcpy.env.cellSize returns 'MAXOF' instead of numerical value in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1403#M175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Magic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Aug 2011 01:07:47 GMT</pubDate>
    <dc:creator>HenryColgate</dc:creator>
    <dc:date>2011-08-29T01:07:47Z</dc:date>
    <item>
      <title>arcpy.env.cellSize returns 'MAXOF' instead of numerical value</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1401#M173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having some trouble with using arcpy to obtain the cell size of datsets when run in IDLE Python. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code I am using reads the full path from a list of ECW files in a CSV and attempts to get the cellsize info using 'arcpy.env.cellSize':&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in csvReader:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.cellSize = row[1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cellSizeVal = arcpy.env.cellSize&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This provides the result I want some of the time (e.g. 0.5) which is correct. However a lot of the time I am getting the value 'MAXOF' returned. However when I view the dataset in ArcView it has the value I am looking for. This data is generally available via an associated ERS file though it is more difficult to read and the ERS is not always available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am curious why I sometimes get the desired value and sometimes get the value MAXOF. Especially when the value is 'always' available in ArcView under the layer properties. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 02:09:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1401#M173</guid>
      <dc:creator>HenryColgate</dc:creator>
      <dc:date>2011-08-24T02:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.cellSize returns 'MAXOF' instead of numerical value</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1402#M174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Get cell size directly from the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Raster_band_properties/000v0000002w000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;raster band&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in csvReader:
&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(row[1]+"/Band_1")
&amp;nbsp;&amp;nbsp;&amp;nbsp; cellSizeVal = desc.meanCellWidth
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.cellSize = cellSizeVal
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1402#M174</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-12-10T20:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.cellSize returns 'MAXOF' instead of numerical value</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1403#M175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Magic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 01:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-cellsize-returns-maxof-instead-of/m-p/1403#M175</guid>
      <dc:creator>HenryColgate</dc:creator>
      <dc:date>2011-08-29T01:07:47Z</dc:date>
    </item>
  </channel>
</rss>

