Label | Explanation | Data Type |
Mosaic Dataset
|
The path and name of the input mosaic dataset. | Mosaic Layer |
Output Mosaic Layer
| The name of the output mosaic layer. | Mosaic Layer |
Expression
(Optional) | Define a query using SQL or use the Query Builder to build a query. | SQL Expression |
Template Extent
(Optional) | The output extent can be specified by defining the four coordinates or by using the extent of an existing layer.
When coordinates are manually provided, the coordinates must be numeric values and in the active map's coordinate system. The map may use different display units than the provided coordinates. Use a negative value sign for south and west coordinates. | Extent |
Bands
(Optional) | The bands that will be exported for the layer. If no bands are specified, all the bands will be used in the output. | Value Table |
Mosaic Method
(Optional) | Choose the mosaic method. The mosaic method defines how the layer is created from different rasters in the mosaic dataset.
| String |
Order Field
(Optional) | Choose the order field. When the mosaic method is By attribute, the default field to use when ordering rasters needs to be set. The list of fields is defined as those in the service table that are of type metadata. | String |
Order Base Value
(Optional) | The order base value. The images are sorted based on the difference between this value and the attribute value in the specified field. | String |
Lock Raster ID
(Optional) | The Raster ID or raster name to which the service should be locked so that only the specified rasters are displayed. If left undefined, it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list. | String |
Sort Order
(Optional) | Choose whether the sort order is ascending or descending.
| String |
Mosaic Operator
(Optional) | Choose the mosaic operator to use. When two or more rasters have the same sort priority, this parameter is used to further refine the sort order.
| String |
Output Cell Size
(Optional) | The cell size of the output mosaic layer. | Double |
Processing Template
(Optional) | The raster function processing template that can be applied on the output mosaic layer.
| String |
Summary
Creates a mosaic layer from a mosaic dataset or layer file. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved as a layer file or the map is saved.
This tool can be used to make a layer so you can work with a specified subset of bands in a mosaic dataset.
Usage
To persist your layer, right-click the layer in the Contents Pane and click Save As Layer File, or use the Save To Layer File tool.
The output can be created with only a subset of the bands. This will save time and disk space.
Parameters
arcpy.management.MakeMosaicLayer(in_mosaic_dataset, out_mosaic_layer, {where_clause}, {template}, {band_index}, {mosaic_method}, {order_field}, {order_base_value}, {lock_rasterid}, {sort_order}, {mosaic_operator}, {cell_size}, {processing_template})
Name | Explanation | Data Type |
in_mosaic_dataset |
The path and name of the input mosaic dataset. | Mosaic Layer |
out_mosaic_layer | The name of the output mosaic layer. | Mosaic Layer |
where_clause (Optional) | Define a query using SQL. | SQL Expression |
template (Optional) | The output extent can be specified by defining the four coordinates or by using the extent of an existing layer.
| Extent |
band_index [ID,...] (Optional) | The bands that will be exported for the layer. If no bands are specified, all the bands will be used in the output. | Value Table |
mosaic_method (Optional) |
Choose the mosaic method. The mosaic method defines how the layer is created from different rasters in the mosaic dataset.
| String |
order_field (Optional) | Choose the order field. When the mosaic method is BY_ATTRIBUTE, the default field to use when ordering rasters needs to be set. The list of fields is defined as those in the service table that are of type metadata. | String |
order_base_value (Optional) | The order base value. The images are sorted based on the difference between this value and the attribute value in the specified field. | String |
lock_rasterid (Optional) | The Raster ID or raster name to which the service should be locked so that only the specified rasters are displayed. If left undefined, it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list. | String |
sort_order (Optional) | Choose whether the sort order is ascending or descending.
| String |
mosaic_operator (Optional) |
Choose the mosaic operator to use. When two or more rasters have the same sort priority, this parameter is used to further refine the sort order.
| String |
cell_size (Optional) | The cell size of the output mosaic layer. | Double |
processing_template (Optional) | The raster function processing template that can be applied on the output mosaic layer.
| String |
Code sample
This is a Python sample for the MakeMosaicLayer function.
arcpy.MakeMosaicLayer_management(
"fgdb.gdb/mdsrc", "mdlayer2", "", "clipmd.shp", "3;2;1",
"BY_ATTRIBUTE", "Tag", "Dataset", "", "DESCENDING", "LAST", "10",
processing_template="NDVI")
This is a Python sample for the MakeMosaicLayer function
arcpy.MakeMosaicLayer_management(
"fgdb.gdb/mdsrc", "mdlayer2", "", "clipmd.shp", "3;2;1",
"BY_ATTRIBUTE", "Tag", "Dataset", "", "DESCENDING", "LAST", "10",
processing_template="Custom_func")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes