<?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 Web Tools with Mosaic Datasets in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/web-tools-with-mosaic-datasets/m-p/1295616#M965</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Is it possible to create and edit mosaic datasets via web tools / geoprocessing services?&lt;/P&gt;&lt;P&gt;I managed to publish and run a script tool performing an intersect with two shape files.&lt;/P&gt;&lt;PRE&gt;import arcpy
a = arcpy.GetParameterAsText(0)
b = arcpy.GetParameterAsText(1)

arcpy.analysis.Intersect([a, b], f"{arcpy.env.scratchGDB}\\intersected", "ALL")
arcpy.SetParameter(2, f"{arcpy.env.scratchGDB}\\intersected")&lt;/PRE&gt;&lt;P&gt;When I try it with the project home GDB path in the registered folder instead of the scratchGDB, I get an empty feature class and map layer. The two input parameters of the script tool are of type shapefile. I kept "add optional output feature service parameter" checked for the derived output parameter whilst publishing, so the output lands in a feature service and the map.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;When I try to do something similar for creating a mosaic dataset, I get either broken project datasource or no error and no output. For example when writing the MD to the scratch GDB:&lt;/P&gt;&lt;P&gt;ERROR 000732: Mosaic Dataset: Dataset C:\Users\HACKEN~1\AppData\Local\Temp\37\ArcGISProTemp74484\scratch.gdb\S_col does not exist or is not supported&lt;BR /&gt;Failed to execute (MakeMosaicLayer).&lt;/P&gt;&lt;P&gt;I have tried it with the Model Builder, scripts and MDCS. I have tried using an existing Mosaic Layer. &lt;EM&gt;arcpy.management.MakeMosaicLayer()&lt;/EM&gt; does not recognize the Mosaic dataset in the input. Do I have to work with image services on the image server for intermediate results?&lt;/P&gt;&lt;PRE&gt;import arcpy
arcpy.CreateMosaicDataset_management(arcpy.env.scratchGDB, "mosaic_dataset","25832", "1","8_BIT_UNSIGNED", "NONE")
#arcpy.management.MakeMosaicLayer(f"{arcpy.env.scratchGDB}\\S_col", "md_lyr")
arcpy.management.AddRastersToMosaicDataset(f"{arcpy.env.scratchGDB}\\mosaic_dataset", "Raster Dataset",
                                           r"D:\FileShare_AGE\2022-11-24", "#", "#",
                                           "#", "2", "#", "#", "#", "*col.tif", "SUBFOLDERS", "EXCLUDE_DUPLICATES")
arcpy.SetParameter(0, f"{arcpy.env.scratchGDB}\\S_col")&lt;/PRE&gt;&lt;P&gt;I have tried with datatypes mosaic layer, mosaic dataset, image service and feature class for the output parameter, as well as home gdb instead of scratch gdb.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jun 2023 07:38:50 GMT</pubDate>
    <dc:creator>MoritzHackenberg</dc:creator>
    <dc:date>2023-06-04T07:38:50Z</dc:date>
    <item>
      <title>Web Tools with Mosaic Datasets</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/web-tools-with-mosaic-datasets/m-p/1295616#M965</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Is it possible to create and edit mosaic datasets via web tools / geoprocessing services?&lt;/P&gt;&lt;P&gt;I managed to publish and run a script tool performing an intersect with two shape files.&lt;/P&gt;&lt;PRE&gt;import arcpy
a = arcpy.GetParameterAsText(0)
b = arcpy.GetParameterAsText(1)

arcpy.analysis.Intersect([a, b], f"{arcpy.env.scratchGDB}\\intersected", "ALL")
arcpy.SetParameter(2, f"{arcpy.env.scratchGDB}\\intersected")&lt;/PRE&gt;&lt;P&gt;When I try it with the project home GDB path in the registered folder instead of the scratchGDB, I get an empty feature class and map layer. The two input parameters of the script tool are of type shapefile. I kept "add optional output feature service parameter" checked for the derived output parameter whilst publishing, so the output lands in a feature service and the map.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;When I try to do something similar for creating a mosaic dataset, I get either broken project datasource or no error and no output. For example when writing the MD to the scratch GDB:&lt;/P&gt;&lt;P&gt;ERROR 000732: Mosaic Dataset: Dataset C:\Users\HACKEN~1\AppData\Local\Temp\37\ArcGISProTemp74484\scratch.gdb\S_col does not exist or is not supported&lt;BR /&gt;Failed to execute (MakeMosaicLayer).&lt;/P&gt;&lt;P&gt;I have tried it with the Model Builder, scripts and MDCS. I have tried using an existing Mosaic Layer. &lt;EM&gt;arcpy.management.MakeMosaicLayer()&lt;/EM&gt; does not recognize the Mosaic dataset in the input. Do I have to work with image services on the image server for intermediate results?&lt;/P&gt;&lt;PRE&gt;import arcpy
arcpy.CreateMosaicDataset_management(arcpy.env.scratchGDB, "mosaic_dataset","25832", "1","8_BIT_UNSIGNED", "NONE")
#arcpy.management.MakeMosaicLayer(f"{arcpy.env.scratchGDB}\\S_col", "md_lyr")
arcpy.management.AddRastersToMosaicDataset(f"{arcpy.env.scratchGDB}\\mosaic_dataset", "Raster Dataset",
                                           r"D:\FileShare_AGE\2022-11-24", "#", "#",
                                           "#", "2", "#", "#", "#", "*col.tif", "SUBFOLDERS", "EXCLUDE_DUPLICATES")
arcpy.SetParameter(0, f"{arcpy.env.scratchGDB}\\S_col")&lt;/PRE&gt;&lt;P&gt;I have tried with datatypes mosaic layer, mosaic dataset, image service and feature class for the output parameter, as well as home gdb instead of scratch gdb.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2023 07:38:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/web-tools-with-mosaic-datasets/m-p/1295616#M965</guid>
      <dc:creator>MoritzHackenberg</dc:creator>
      <dc:date>2023-06-04T07:38:50Z</dc:date>
    </item>
  </channel>
</rss>

