AnsweredAssumed Answered

Using Mosaic footprints and Boundaries as GP inputs using python

Question asked by sm970mn on Feb 7, 2014
Latest reply on Feb 7, 2014 by sm970mn
Hi All,

I'm a python newbie with a fairly basic question. I'm having a hard time getting arcpy.Integrate_management to accept a mosaic's boundary as input. I get a "does not exist or is not supported" error message. I tried a number of syntax variations on the boundary's filepath without any luck.

If I have the MD added to ArcMap, I can run the Integrate tool, by itself, on the boundary through ArcToolbox but not when trying to use my script.

Here's my script so far:

# Import system modules import arcpy  import os  # Set the necessary product code import arceditor  # Set the gdb for the mosaic inWS = arcpy.GetParameterAsText(0)  MoDataName = arcpy.GetParameterAsText(1)  arcpy.env.overwriteOutput = True  #Set projection to be used by the mosaic  prjfile= arcpy.GetParameterAsText(2)  # Create the mosaic dataset  arcpy.CreateMosaicDataset_management(inWS,MoDataName,prjfile,"","","", "")   # Adding the Rasters Input = inWS+"\\" + MoDataName InPath = arcpy.GetParameterAsText(3) arcpy.AddRastersToMosaicDataset_management(Input,"Raster Dataset",InPath,"UPDATE_CELL_SIZES", "UPDATE_BOUNDARY", "NO_OVERVIEWS", "", "0", "1500", "", "", "NO_SUBFOLDERS", "ALLOW_DUPLICATES", "NO_PYRAMIDS", "NO_STATISTICS", "NO_THUMBNAILS", "Add Raster Datasets")  # Integrate the MD's boundary to remove any slivers by using the XY tolerance of 0.31 meters Boundary = "MoDataName\\Boundary" xyTolerance = "0.31 Meters"  arcpy.Integrate_management("Input\\Boundary", xyTolerance)

If I just execute the Integrate GP tool on the boundary locally, this is how ModelBuilder exports the script:

# Import arcpy module import arcpy   # Local variables: Boundary = "DUV2013\\Boundary"  # Process: Integrate arcpy.Integrate_management("DUV2013\\Boundary #", "0.31 Meters")

I can run the script fine without the integrate gp, but this results in a bunch of slivers in the boundary. I don't want to, but I may just end up using the make mosaic layer tool. Any help figuring this out would be greatly appreciated.