<?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: ESRI GRID file (ASC) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312646#M24317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for comment, empty I mean is new Grid and it can be with no data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2016 20:54:11 GMT</pubDate>
    <dc:creator>JosephLing</dc:creator>
    <dc:date>2016-04-05T20:54:11Z</dc:date>
    <item>
      <title>ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312644#M24315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to create an empty ESRI GRID file (ASC) based on the size of "Based polygon" with cell size 10?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 09:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312644#M24315</guid>
      <dc:creator>JosephLing</dc:creator>
      <dc:date>2016-04-04T09:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312645#M24316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/an-overview-of-the-to-raster-toolset.htm" title="https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/an-overview-of-the-to-raster-toolset.htm"&gt;https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/an-overview-of-the-to-raster-toolset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;is the conversion to raster toolset&lt;/P&gt;&lt;P&gt;the perhaps raster to ASCII &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/raster-to-ascii.htm" title="https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/raster-to-ascii.htm"&gt;https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/raster-to-ascii.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;By an 'empty' one... do you mean one where the bounds are classed as no data, it is not clear what you are trying to accomplish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 09:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312645#M24316</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-04T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312646#M24317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for comment, empty I mean is new Grid and it can be with no data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 20:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312646#M24317</guid>
      <dc:creator>JosephLing</dc:creator>
      <dc:date>2016-04-05T20:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312647#M24318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a little confused exactly what you're after here. ESRI GRID (raster) and ASCII (text) are two separate file formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create an ASCII file as easily as opening a text editor and start typing a file like the following, substituting your own values in the header and use the 'NODATA' value for the pixel values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/194001_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 21:35:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312647#M24318</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-04-05T21:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312648#M24319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well you could exploit Darren's data and simply convert the nodata value to 1, then use the&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/ascii-to-raster.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/ascii-to-raster.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ASCII to Raster—Help | ArcGIS for Desktop&lt;/A&gt; .&amp;nbsp; You will obviously have to have the correct number of rows and columns and properly specify the location of the bottom left cell (center or corner) and the X and Y cell size (ie 10m for both)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can cheat even further by using the ideas here.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/numpyarraytoraster-function.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/numpyarraytoraster-function.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;NumPyArrayToRaster—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import numpy as np
import arcpy
LLcorner = arcpy.Point(500000,5000000) # x,y coordinate of the lower left corner, in this case the middle of a UTM zone
rows= 10
cols = 10
cell_size = 10
nodata = 0.0 # or whatever
a = np.zeros((rows,cols),dtype='float64') # or 'int32'
out_raster = arcpy.NumPyArrayToRaster( a, LLcorner, x_cell_size = cell_size, value_to_nodata = nodata)
out_raster.save(" path and name to raster) # specify and extension for non-esri grid formats such as tif&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312648#M24319</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI GRID file (ASC)</title>
      <link>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312649#M24320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for that. Now the step 2 I wish to achieve is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Once the ASC file in #1 above is created, I need to run the following formula on each of the grid cell.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: black; text-decoration: underline;"&gt;&lt;STRONG&gt;First:&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With reference from the point of interest, as shown in the "Based polygon" image below (with &lt;/SPAN&gt;&lt;STRONG style="color: #4ba524; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;green&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; square), &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I want to run&amp;nbsp;&amp;nbsp; tan&lt;SUP&gt;-1 &lt;/SUP&gt;(x/y) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Grid point (x,y) will be in the center of each cell)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Example: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location of point of interest (0, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tan&lt;SUP&gt;-1&lt;/SUP&gt; of (75, 50) = 56.3 (value of one of the grid cell with reference from point of interest (0,0)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;STRONG&gt;&lt;EM style="color: black; font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [If point of interest is 10, 10 in the map, then the X,Y calculated above will be 85, 60 in the map]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Second:&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I need to calculate linear interpolation (which is not yet confirmed the formula)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt; &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Third:&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: black;"&gt;&amp;nbsp;&amp;nbsp; Result A x Result B x [Some other value]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/194145_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out if there is other way to do, but thanks all in advance for reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 02:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-grid-file-asc/m-p/312649#M24320</guid>
      <dc:creator>JosephLing</dc:creator>
      <dc:date>2016-04-07T02:14:49Z</dc:date>
    </item>
  </channel>
</rss>

