<?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: makeRasterLayer_management in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382099#M30117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; one more (and hopefully last) question - why is it not possible to put a parameter to the MakeRasterLayer_management out_rasterlayer field:&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rasterPath = arcpy.Describe(files).catalogPath
rasterName = "test"
arcpy.MakeRasterLayer_management(rasterPath, rasterName)&lt;/PRE&gt;&lt;BR /&gt;i get this same Execution error 000582)&lt;BR /&gt;[000582 : Error occurred during execution.]&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why it's failing for you. This has always worked for me. In fact I usually do it that way... are you sure that's where your script is failing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;000582 is an extremely generic error. Did you get another error message as well?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:36:51 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T17:36:51Z</dc:date>
    <item>
      <title>makeRasterLayer_management</title>
      <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382096#M30114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im sitting over a probably simple problem since hours, but somehow i cant solve the problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im converting ascii to esri rasters in a separte Method (core of this method): this works fine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = resultsPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ASCIIToRaster_conversion(inRaster, outRaster, "FLOAT")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in another method, im trying to make Rasters and later .lyr files out of those created rasters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;def addRammsFiles(mxd, nameR):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace= targetPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for files in arcpy.ListRasters():&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rasterName = arcpy.Describe(files).name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rasterPath = targetPath + "/" + rasterName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeRasterLayer_management(rasterPath , rasterName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #arcpy.SaveToLayerFile_management(rasterName, rasterPath + ".lyr")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im always getting the Error 00582: Error occured during excecution. (The name of the raster is &amp;lt; 13)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does someone have an idea why it doesnt work (it worked previously, with rasters from featureToRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;help would be DEEPLY appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;qet&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2012 11:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382096#M30114</guid>
      <dc:creator>thomsh</dc:creator>
      <dc:date>2012-04-14T11:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: makeRasterLayer_management</title>
      <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382097#M30115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You probably want to use catalogPath instead of name. You also want to strip off any extensions on the input raster name so the .lyr file name will be valid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import os
arcpy.env.workspace = targetPath
for files in arcpy.ListRasters():
&amp;nbsp;&amp;nbsp;&amp;nbsp; rasterPath = arcpy.Describe(files).catalogPath
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeRasterLayer_management(rasterPath , "lyrRaster")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SaveToLayerFile_management("lyrRaster", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.path.splitext(rasterPath)[0] + ".lyr")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:36:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382097#M30115</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T17:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: makeRasterLayer_management</title>
      <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382098#M30116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thx a lot! now it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;perfect idea!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;one more (and hopefully last) question - why is it not possible to put a parameter to the MakeRasterLayer_management out_rasterlayer field:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rasterPath = arcpy.Describe(files).catalogPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rasterName = "test"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeRasterLayer_management(rasterPath, rasterName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(i get this same Execution error 000582)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;greetings, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;qet&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 07:29:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382098#M30116</guid>
      <dc:creator>thomsh</dc:creator>
      <dc:date>2012-04-16T07:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: makeRasterLayer_management</title>
      <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382099#M30117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; one more (and hopefully last) question - why is it not possible to put a parameter to the MakeRasterLayer_management out_rasterlayer field:&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rasterPath = arcpy.Describe(files).catalogPath
rasterName = "test"
arcpy.MakeRasterLayer_management(rasterPath, rasterName)&lt;/PRE&gt;&lt;BR /&gt;i get this same Execution error 000582)&lt;BR /&gt;[000582 : Error occurred during execution.]&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why it's failing for you. This has always worked for me. In fact I usually do it that way... are you sure that's where your script is failing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;000582 is an extremely generic error. Did you get another error message as well?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382099#M30117</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T17:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: makeRasterLayer_management</title>
      <link>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382100#M30118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes im sure - and i also worked for me in previous scripts...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx for ur answers, guess i will have to try and error a bit more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;qet&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 04:29:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerasterlayer-management/m-p/382100#M30118</guid>
      <dc:creator>thomsh</dc:creator>
      <dc:date>2012-04-18T04:29:23Z</dc:date>
    </item>
  </channel>
</rss>

