<?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 Faster way to automate this? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79735#M2789</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple script that places rasters into a catalog then mosaics them. I can't help but feel I am doing this in a less than optimal manner. So, I am wondering if there is a faster way to run this or if I should just be patient with current speeds? Thanks for any help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14121093055288684 jive_text_macro" jivemacro_uid="_14121093055288684"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;from arcpy import env&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ws = r"C:/test"&lt;/P&gt;
&lt;P&gt;rc = r"C:/H/H.gdb/DEM_Tiles"&lt;/P&gt;
&lt;P&gt;try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for dirpath, dirnames, filenames in arcpy.da.Walk(ws, datatype="RasterDataset", type="ALL"):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in filenames:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addRaster = arcpy.WorkspaceToRasterCatalog_management(ws, rc, "INCLUDE_SUBDIRECTORIES", "NONE")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "adding:", filename&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;except:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Workspace to raster catalog failed"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Setting up mosaic for tiles..."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterCatalogToRasterDataset_management(r"C:H.gdb/DEM_Tiles", r"C:/H.gdb/Mosaic", "", "FIRST", "FIRST", "", "", "8_BIT_UNSIGNED", "NONE", "NONE", "", "")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;except:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "raster mosaic failed"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2014 20:33:39 GMT</pubDate>
    <dc:creator>ChrisBrannin1</dc:creator>
    <dc:date>2014-09-30T20:33:39Z</dc:date>
    <item>
      <title>Faster way to automate this?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79735#M2789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple script that places rasters into a catalog then mosaics them. I can't help but feel I am doing this in a less than optimal manner. So, I am wondering if there is a faster way to run this or if I should just be patient with current speeds? Thanks for any help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14121093055288684 jive_text_macro" jivemacro_uid="_14121093055288684"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;from arcpy import env&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ws = r"C:/test"&lt;/P&gt;
&lt;P&gt;rc = r"C:/H/H.gdb/DEM_Tiles"&lt;/P&gt;
&lt;P&gt;try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for dirpath, dirnames, filenames in arcpy.da.Walk(ws, datatype="RasterDataset", type="ALL"):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in filenames:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addRaster = arcpy.WorkspaceToRasterCatalog_management(ws, rc, "INCLUDE_SUBDIRECTORIES", "NONE")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "adding:", filename&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;except:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Workspace to raster catalog failed"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Setting up mosaic for tiles..."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterCatalogToRasterDataset_management(r"C:H.gdb/DEM_Tiles", r"C:/H.gdb/Mosaic", "", "FIRST", "FIRST", "", "", "8_BIT_UNSIGNED", "NONE", "NONE", "", "")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;except:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "raster mosaic failed"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 20:33:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79735#M2789</guid>
      <dc:creator>ChrisBrannin1</dc:creator>
      <dc:date>2014-09-30T20:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Faster way to automate this?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79736#M2790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you create a managed raster catalog, or an unmanaged raster catalog?&amp;nbsp; A managed raster catalog will copy the rasters into the geodatabase, while an unmanaged raster catalog will simply reference the path of the rasters on disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wouldn't recommend using a raster catalog at all, though.&amp;nbsp; I would recommend creating a &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//009t00000037000000"&gt;mosaic dataset&lt;/A&gt;.&amp;nbsp; The performance is very fast, and I doubt you'll have the need to export the mosaic dataset to a raster dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79736#M2790</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-10-01T12:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Faster way to automate this?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79737#M2791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jake: Thank you for the response. I saw the mosaic dataset option but was unsure of my ability to use a clip function with it. Will I still be able to clip boundaries out of a mosaic dataset? I'll have to run this and give it a shot. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:23:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79737#M2791</guid>
      <dc:creator>ChrisBrannin1</dc:creator>
      <dc:date>2014-10-01T13:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Faster way to automate this?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79738#M2792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, and it's 100x faster!&amp;nbsp; You can apply functions to mosaic datasets by right-clicking on the mosaic dataset in the catalog window &amp;gt; Properties &amp;gt; Functions tab.&amp;nbsp; Below are some helpful links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/What_are_the_functions_used_by_a_raster_or_mosaic_dataset/009t00000044000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/What_are_the_functions_used_by_a_raster_or_mosaic_dataset/009t00000044000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//009t00000048000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//009t00000048000000"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:26:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79738#M2792</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-10-01T13:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Faster way to automate this?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79739#M2793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing, thank you for opening my eyes to this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/faster-way-to-automate-this/m-p/79739#M2793</guid>
      <dc:creator>ChrisBrannin1</dc:creator>
      <dc:date>2014-10-01T13:28:17Z</dc:date>
    </item>
  </channel>
</rss>

