I have a mosaic raster of an agricultural area. In the mosaic raster, a specific agricultural field (field no. 5) looks just like this
When I clip the raster with the field's shapefile (shapefile of the field no. 5) the color changes a bit and looks like the following image.
The following codes have been used to clip the mosaic raster -
#clipping the raster
arcpy.Clip_management(in_raster= mosaic_pan_layer, rectangle=str(extent_of_shape_file),
out_raster=pan_save, in_template_dataset=shape_file, nodata_value="65536",
#saving the clipped raster
arcpy.CopyRaster_management (in_raster = pan_save, out_rasterdataset = Clipped_pan_save, nodata_value = "9999")
I also have done the following -
- mosaic image > properties > symbology > save the statistics in xml . Then went to the symbology of the clipped result image > "rgb composite"> type = "custom" > statistics = "from custom settings", and loaded the statistics using xml.
Here is the results -
The result is -
The mosaic image has some black portion where the pixel values are 0