Select to view content in your preferred language

arcpy.management.CompositeBands behaves differently between Arc Pro and Arc Server

280
0
09-26-2024 09:29 AM
todddoerr2
New Contributor

I get different results when I run arcpy.management.CompositeBands in Arc Pro (3.1) python window vs. as GP service on Arc Server (10.91). 

Here's the code:

 

 

inputRaster = r"<some network path>\LC22_CBD_230.tif"
outputTif = os.path.join(arcpy.env.scratchFolder, "smallarea.tif")

with arcpy.EnvManager(
    outputCoordinateSystem='PROJCS["Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-113.675],PARAMETER["Standard_Parallel_1",42.148],PARAMETER["Standard_Parallel_2",42.29],PARAMETER["Latitude_Of_Origin",42.219],UNIT["Meter",1.0]]',
    rasterStatistics="NONE",
    pyramid="NONE",
    extent='-122.803308540951 42.3766738424979 -121.801628377294 43.3488942814668 GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'):
        
    arcpy.management.CompositeBands(
        in_rasters=inputRaster,
        out_raster=outputTif
    )

 

 

 

The Pro version creates an output tif that's clipped to my extent coordinates.  That's good and what I expected.

The Server version creates an output tif that's not clipped at all.  It's the entire entire size and extent of the input raster.

Why am I getting this unexpected result on Arc Server?

Thank you for your help.

0 Kudos
0 Replies