Make Image Server Layer (Data Management)

Summary

Creates a temporary raster layer from an image service. The layer that is created will not persist after the session ends unless the document is saved.

The input can also be a SOAP URL to an image server.

Usage

  • Use this tool to create an image layer from an image service or a URL that references an image service.

  • The output can be the entire image service or a portion of it.

  • Use this tool to add an image service to a Python script or model or when creating a geoprocessing service.

  • You can clip out a portion of the image service by choosing an output extent layer or by specifying the rectangle extent. If you choose an output extent layer, the clip extent will be based on the extent of that layer.

  • The output can be created with only a subset of the bands. This will help save on time and disk space.

  • The mosaicking options are only available when the image service it contains is generated from a mosaic definition or an image service definition.

Parameters

LabelExplanationData Type
Input Image Service

The name of the input image service or the SOAP URL that references the image service. Browse to or type the input image service. This tool can also accept a SOAP URL that references the image service.

An example of using the image service name called ProjectX is: C:\MyProject\ServerConnection.ags\ProjectX.ImageServer.

An example of a URL is http://AGSServer:8399/arcgis/services/ISName/ImageServer.

Image Service; String
Output Image Server Layer

The name of the output image layer.

Raster Layer
Template Extent
(Optional)

The output extent of the image layer.

  • Current Display Extent Map View—The extent will be based on the active map or scene. This option is only available when there is an active map.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene. This option will create a feature class in the project geodatabase and add a layer to the map. The feature class will have the same coordinate system as the map.
    Note:

    This option is not available in the Environments dialog box. It is only available from a tool parameter with an extent data type or from the Environments tab on a tool dialog box.

    Note:

    When the Enable and disable editing from the Edit tab editing option is checked, you must enable editing on the Edit ribbon tab to draw the extent.

  • Extent of a Layer Layer—The extent will be based on an active map layer. Use the drop-down list to choose an available layer or use the Extent of data in all layers option to get the combined extent of all active map layers, excluding the basemap. This option is only available when there is an active map with layers.

    Each map layer has the following options:

    • All Features Select All—The extent of all features in the layer.
    • Selected Features Area from Selected Features—The extent of the selected features in the layer.
    • Visible Features Extent Indicator—The extent of the visible features in the layer.
      Note:

      The extents from the Selected Features Area from Selected Features and Visible Features Extent Indicator options are only available for feature layers.

  • Browse Browse—The extent will be based on an existing dataset.
  • Clipboard Paste—The extent can be copied to and pasted from the clipboard.
    • Copy Extent Copy—Copies the extent coordinates and coordinate system to the clipboard.
    • Use Paste Extent Paste—Pastes the extent coordinates and, optionally, the coordinate system from the clipboard. If the clipboard values do not include a coordinate system, the extent will use the map’s coordinate system.
    Note:

    The extent coordinates are copied to and pasted from the clipboard using the same formatting and order as the ArcPy Extent object: x-min, y-min, x-max, y-max, and the spatial reference.

  • Reset Extent Reset—The extent will be reset to the default value.
  • Manually entered coordinates—The coordinates must be numeric values and in the active map's coordinate system.
    Caution:

    The map may use different display units than the entered coordinates. The use of a cardinal direction (N, S, E, W) is not supported. 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)

The mosaic method defines how the mosaic is created from different rasters.

  • SEAMLINESmooth transitions between images using seamlines.
  • NORTH_WESTDisplay imagery that is closest to the northwest corner of the mosaic dataset boundary.
  • CLOSEST_TO_CENTERDisplay imagery that is closest to the center of the screen.
  • LOCK_RASTERSelect specific raster datasets to display.
  • BY_ATTRIBUTEDisplay and prioritize imagery based on a field in the attribute table.
  • CLOSEST_TO_NADIRDisplay the rasters with viewing angles closest to zero.
  • CLOSEST_TO_VIEWPOINTDisplay imagery that is closest to a selected viewing angle.
  • NONEOrder rasters based on the ObjectID in the mosaic dataset attribute table.
String
Order Field
(Optional)

The default field to use to order the rasters when the mosaic method is By_Attribute. The list of fields is defined as those in the service table that are of type metadata and are integer (for example, the values can represent dates or cloud cover percentage).

String
Order Base Value
(Optional)

The images are sorted based on the difference between this input 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, such that only the specified rasters are displayed. If left blank (undefined), it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list.

String
Output Cell Size
(Optional)

The cell size for the output image service layer.

Double
Expression
(Optional)

Define a query using SQL or use the Query Builder to build a query.

SQL Expression
Processing Template
(Optional)

The raster function processing template that can be applied on the output image service layer.

  • NoneNo processing template.
String

arcpy.management.MakeImageServerLayer(in_image_service, out_imageserver_layer, {template}, {band_index}, {mosaic_method}, {order_field}, {order_base_value}, {lock_rasterid}, {cell_size}, {where_clause}, {processing_template})
NameExplanationData Type
in_image_service

The name of the input image service or the SOAP URL that references the image service.

An example of using the image service name called ProjectX is: C:\MyProject\ServerConnection.ags\ProjectX.ImageServer.

An example of a URL is http://AGSServer:8399/arcgis/services/ISName/ImageServer.

Image Service; String
out_imageserver_layer

The name of the output image layer.

Raster Layer
template
(Optional)

The output extent of the image layer.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
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)

The mosaic method defines how the mosaic is created from different rasters.

  • SEAMLINESmooth transitions between images using seamlines.
  • NORTH_WESTDisplay imagery that is closest to the northwest corner of the mosaic dataset boundary.
  • CLOSEST_TO_CENTERDisplay imagery that is closest to the center of the screen.
  • LOCK_RASTERSelect specific raster datasets to display.
  • BY_ATTRIBUTEDisplay and prioritize imagery based on a field in the attribute table.
  • CLOSEST_TO_NADIRDisplay the rasters with viewing angles closest to zero.
  • CLOSEST_TO_VIEWPOINTDisplay imagery that is closest to a selected viewing angle.
  • NONEOrder rasters based on the ObjectID in the mosaic dataset attribute table.
String
order_field
(Optional)

The default field to use to order the rasters when the mosaic method is By_Attribute. The list of fields is defined as those in the service table that are of type metadata and are integer (for example, the values can represent dates or cloud cover percentage).

String
order_base_value
(Optional)

The images are sorted based on the difference between this input 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, such that only the specified rasters are displayed. If left blank (undefined), it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list.

String
cell_size
(Optional)

The cell size for the output image service layer.

Double
where_clause
(Optional)

Define a query using SQL.

SQL Expression
processing_template
(Optional)

The raster function processing template that can be applied on the output image service layer.

  • NoneNo processing template.
String

Code sample

MakeImageServerLayer example 1 (Python window)

This is a Python sample for the MakeImageServerLayer tool.

arcpy.MakeImageServerLayer_management(
        input2, "mdlayer", "feature.shp", "1;2;3",
        "LockRaster", "#", "#", "4", "#", processing_template="Hillshade")
MakeImageServerLayer example 2 (Python window)

This is a Python script sample for the MakeImageServerLayer tool.

arcpy.MakeImageServerLayer_management(
        input2, "mdlayer", "feature.shp", "1;2;3",
        "LockRaster", "#", "#", "4", "#", processing_template="Custom_func")

Related topics