<?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 Raster Domain python script change output location in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50927#M4030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a folder tree with many other folders in it containing many images. I have managed to make a script that will parse through the entire folder and find every image in it. It then uses raster domain to create&amp;nbsp;a polygon shapefile of every footprint for each image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I am having is I need to have those footprints exported to a single folder named "index". The current script always exports the footprints to the same folder the image is located in. How can I change my script to export the raster domain footprints to the "index" folder instead of them being exported to the folder containing the imagery?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;import arcpy&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;import os&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;workspace = r”D:\Folder\Test”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;outFile = r”D:\Folder\Index”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;rasters = []&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;arcpy.CheckOutExtension(“3D”)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;print ‘Processing’&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;for dirpath, dirnames, filenames, in arcpy.da.Walk(workspace, topdown=True, datatype=”RasterDataset”):&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in filenames:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rasters.append(os.path.join(dirpath, filename))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;for raster in rasters:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outGeom = “POLYGON”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outPoly = raster[:-4]+”.shp”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterDomain_3d(raster, outPoly, outGeom)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;print rasters&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;print ‘Completed’&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;I'm pretty sure the answer lies with changing the "outPoly" parameter but anything I have tried resulted in an error. Any help would be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;Thank you for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2018 22:12:37 GMT</pubDate>
    <dc:creator>Jacques-AlexandreGadoury</dc:creator>
    <dc:date>2018-11-27T22:12:37Z</dc:date>
    <item>
      <title>Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50927#M4030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a folder tree with many other folders in it containing many images. I have managed to make a script that will parse through the entire folder and find every image in it. It then uses raster domain to create&amp;nbsp;a polygon shapefile of every footprint for each image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I am having is I need to have those footprints exported to a single folder named "index". The current script always exports the footprints to the same folder the image is located in. How can I change my script to export the raster domain footprints to the "index" folder instead of them being exported to the folder containing the imagery?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;import arcpy&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;import os&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;workspace = r”D:\Folder\Test”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;outFile = r”D:\Folder\Index”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;rasters = []&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;arcpy.CheckOutExtension(“3D”)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;print ‘Processing’&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;for dirpath, dirnames, filenames, in arcpy.da.Walk(workspace, topdown=True, datatype=”RasterDataset”):&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in filenames:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rasters.append(os.path.join(dirpath, filename))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;for raster in rasters:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outGeom = “POLYGON”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outPoly = raster[:-4]+”.shp”&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterDomain_3d(raster, outPoly, outGeom)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;print rasters&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;print ‘Completed’&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;I'm pretty sure the answer lies with changing the "outPoly" parameter but anything I have tried resulted in an error. Any help would be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;Thank you for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 22:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50927#M4030</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-27T22:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50928#M4031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacques,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RasterDomain_3d&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;raster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outPoly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outGeom&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 12:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50928#M4031</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-11-28T12:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50929#M4032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the raster types? You are slicing off the last 4 characters of the raster name which is useful if it is a *.tif, but can result in other errors if they aren't.&amp;nbsp; for example&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;'dem'[:-4]
''&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;would result in a null name to which you append .shp.&lt;/P&gt;&lt;P&gt;What is the error message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50929#M4032</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T21:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50930#M4033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gave that a shot, it still exported the shapefiles to the workspace, there are no shapefiles in the&amp;nbsp;outfile folder. The script did still run without any errors though. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:10:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50930#M4033</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T15:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50931#M4034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a large variety of types, .TIF is the most common but we also have .TIL .IMD .NTF .JPG, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this because I started trying this out with model builder, but the model would end up saving the file as a "Raster.tif.shp" which gave errors with following tools. When I switched over to a script instead of a model I kept that code to slice off the .tif or which ever extension to make sure I get a .shp and not a .tif.shp shapefile like I use to get in the model builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there is no error message the script runs as it should and it outputs a shapefile with the same name as the raster with the footprint. It just does not save it where I want it to be saved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50931#M4034</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T15:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50932#M4035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before the arcpy.RasterDomain_3d function, add a print statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outPoly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is this returning?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50932#M4035</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-11-28T15:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50933#M4036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So adding the command line as so:&lt;/P&gt;&lt;P&gt;outPoly = raster[:-4]+"shp"&lt;/P&gt;&lt;P&gt;print (os.path.join(outFile, outPoly))&lt;/P&gt;&lt;P&gt;arcpy.RasterDomain_3d(.....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns paths for each file as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D:\Folder\Test\Imagery\Applanix\Cambridge\21671694.shp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing this means it is still reading the outFile as the workspace?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50933#M4036</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T15:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50934#M4037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you check for shapefiles in the folders where the rasters were initially located?&lt;/P&gt;&lt;P&gt;The print statement suggested by Jake should clarify that&lt;/P&gt;&lt;P&gt;in the interim check one folder first... use the code snippet at the bottom of this help incase it is the 'walk' thing that is fouling up&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/raster-domain.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/raster-domain.htm"&gt;Raster Domain—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50934#M4037</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-28T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50935#M4038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried simply using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print (os.path.join(outPoly))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without outFile, it returned the same thing as if I had (outFile, outPoly)&lt;/P&gt;&lt;P&gt;D:\Folder\Test\Imagery\Applanix\Cambridge\21671694.shp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 16:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50935#M4038</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T16:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50936#M4039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I have already looked at that code sample and that is actually where I got the [:-4]. The script&amp;nbsp;did work for individual folders, so it is possible that the way I have my walk setup or the raster list appended might be causing issues. But I do need this to work with a walk as it is the best way of parsing through a folder tree while ignoring images in geodatabases and in mosaics. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement Jake provided as shown in the responses below did give an unexpected result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:00:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50936#M4039</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T17:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50937#M4040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using ArcGIS pro then be aware...&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; list-style-position: outside; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Shapefiles cannot be added to the project Databases folder but must be stored in the project folder or a folder connection.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/help/data/shapefiles/working-with-shapefiles-in-arcgis-pro.htm" title="http://pro.arcgis.com/en/pro-app/help/data/shapefiles/working-with-shapefiles-in-arcgis-pro.htm"&gt;Shapefiles in ArcGIS Pro—Shapefiles | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 18:17:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50937#M4040</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-28T18:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50938#M4041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am on ArcGIS 10.4.&amp;nbsp; But it is indeed useful to know that about ArcPro for future reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 19:13:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50938#M4041</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T19:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50939#M4042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; raster &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; rasters&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; outGeom &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"POLYGON"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; outPoly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;raster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".shp"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RasterDomain_3d&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;raster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outPoly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outGeom&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50939#M4042</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T21:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50940#M4043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beautiful Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems to have worked. I'm guessing that os.path.basename(raster) stripped the path that was appended in the rasters =[] list? Anyways I think this should do. Thank you for your help. I'll just action this as correct as it did complete what I set out for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 21:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50940#M4043</guid>
      <dc:creator>Jacques-AlexandreGadoury</dc:creator>
      <dc:date>2018-11-28T21:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Domain python script change output location</title>
      <link>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50941#M4044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the os.path.basename simply took the file name rather than the entire path.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 21:12:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/raster-domain-python-script-change-output-location/m-p/50941#M4044</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-11-28T21:12:52Z</dc:date>
    </item>
  </channel>
</rss>

