<?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: Convert data type in Euclidean distance calculation script in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305197#M4284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This, however, does not change the integer data format to a floating point. Is there any way to specify or convert the output Euclidean distance data format to FP so I can get an output as FP?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As was pointed out, the output of &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000001p000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;EucDistance&lt;/A&gt;&lt;SPAN&gt; should be floating point. And, integer * float should give you float. But if you want to make triple sure, you can always convert a grid to float using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000008w000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Float&lt;/A&gt;&lt;SPAN&gt; tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from arcpy.sa import *
...
OutEucDistance = Float(EucDistance(src_layer, "", resolution, "")) * 0.000621371192&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:37:00 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T14:37:00Z</dc:date>
    <item>
      <title>Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305193#M4280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script where I'm trying to perform a Euclidean distance on a feature class to generate a raster. The map units are meters so it outputs the cell size in meters as an integer format. I want it in miles, so I multiply by a constant to convert to miles. This, however, does not change the integer data format to a floating point. Is there any way to specify or convert the output Euclidean distance data format to FP so I can get an output as FP?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the line of code I'm using in the script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;OutEucDistance = (EucDistance(src_layer, "", resolution, "")*0.000621371192)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305193#M4280</guid>
      <dc:creator>AndrewOrr</dc:creator>
      <dc:date>2012-04-17T13:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305194#M4281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;according to the help &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000001p000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000001p000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;the output raster is supposed to be floating point, perhaps trying to multiply that raster by a constant raster outside you euclidean distance might work&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:49:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305194#M4281</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2012-04-17T13:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305195#M4282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's an idea! I'll look into it. Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 17:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305195#M4282</guid>
      <dc:creator>AndrewOrr</dc:creator>
      <dc:date>2012-04-17T17:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305196#M4283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This, however, does not change the integer data format to a floating point. Is there any way to specify or convert the output Euclidean distance data format to FP so I can get an output as FP?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Dapper Dan pointed out, the output of &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000001p000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;EucDistance&lt;/A&gt;&lt;SPAN&gt; should be floating point. And, (integer * float) should always give you float. But if you want to make triple sure, you can always convert a grid to float using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000008w000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Float&lt;/A&gt;&lt;SPAN&gt; tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing that may be messing you up is the artificial ArcGIS designation of a raster as "discrete" or "continuous", which is used for symbology but can be unrelated to the pixel data type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from arcpy.sa import *
...
OutEucDistance = Float(EucDistance(src_layer, "", resolution, "")) * 0.000621371192&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305196#M4283</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T14:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305197#M4284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This, however, does not change the integer data format to a floating point. Is there any way to specify or convert the output Euclidean distance data format to FP so I can get an output as FP?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As was pointed out, the output of &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000001p000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;EucDistance&lt;/A&gt;&lt;SPAN&gt; should be floating point. And, integer * float should give you float. But if you want to make triple sure, you can always convert a grid to float using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z0000008w000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Float&lt;/A&gt;&lt;SPAN&gt; tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from arcpy.sa import *
...
OutEucDistance = Float(EucDistance(src_layer, "", resolution, "")) * 0.000621371192&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:37:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305197#M4284</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert data type in Euclidean distance calculation script</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305198#M4285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Excellent, that worked very well curtvprice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 18:32:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/convert-data-type-in-euclidean-distance/m-p/305198#M4285</guid>
      <dc:creator>AndrewOrr</dc:creator>
      <dc:date>2012-04-27T18:32:24Z</dc:date>
    </item>
  </channel>
</rss>

