Summary
Automatically aligns a raster to a reference image or uses a control point file for georegistration. If the input dataset is a mosaic dataset, the tool will operate on each mosaic dataset item. To automatically register the image, the input raster and the reference raster must be in a relatively close geographic area. The tool will run faster if the raster datasets are in close alignment. You may need to create a link file, also known as a control point file, with a few links to get your input raster into the same map space.
Usage
The input raster will have its georeferencing information updated.
A link table can be created using the Georeferencing toolbar.
The Reset keyword (register_mode = "RESET" in Python) allows you to remove any geographic transformation that has been applied using this tool.
This tool allows you to register all the items within a mosaic dataset, a subset of items, or a single item within a mosaic dataset. If you only want to register a specific item, you will need to enter the full path of the mosaic dataset and a unique query for the item you want to update.
The following are examples of how to choose an item within a mosaic dataset as your input raster:
- \\Myserver\MyFolder\MyMosaicDataset\OBJECTID=1
- \\Myserver\MyFolder\MyMosaicDataset\NAME='tileName01'
If you want to choose a subset of the items, you can make a selection on the mosaic dataset layer.
When the input raster is a mosaic dataset with pan-sharpened items, this tool can register the multispectral raster to the panchromatic raster when you choose the REGISTER_MS keyword within the Register Mode parameter. Make sure you leave the Reference Raster and the Input Link File parameters empty.
Syntax
arcpy.management.RegisterRaster(in_raster, register_mode, {reference_raster}, {input_link_file}, {transformation_type}, {output_cpt_link_file}, {maximum_rms_value})
Parameter | Explanation | Data Type |
in_raster | The raster that you want to realign. Registering a mosaic dataset item will update that particular item within the mosaic dataset. A mosaic dataset item will have the path to the mosaic dataset followed by the Object ID of the item. For example, the first item in the mosaic dataset would have the following path: .\mosaicDataset\objectid=1. | Mosaic Layer; Raster Dataset; Raster Layer |
register_mode | Specifies the registration mode. You can either register the raster with a transformation or reset the transformation.
| String |
reference_raster (Optional) | The raster dataset that will align the input raster dataset. Leave this parameter empty if you want to register your multispectral mosaic dataset items to their associated panchromatic raster datasets. | Image Service; Internet Tiled Layer; Map Server Layer; Map Server; Mosaic Layer; Raster Dataset; Raster Layer; WMS Map |
input_link_file (Optional) | The file that has the coordinates to link the input raster dataset with the reference. The input link table works with one mosaic item in the mosaic layer. The input must specify which item is being processed, either selecting the item or specifying the ObjectID in the input. Leave this parameter empty to register multispectral mosaic dataset items with the associated panchromatic raster datasets. | Feature Class; Text File |
transformation_type (Optional) | Specifies the method for shifting the raster dataset.
| String |
output_cpt_link_file (Optional) | If specified, a text file will be written containing the links created by this tool. This file can be used in the Warp From File tool. The output link table works with one mosaic dataset item in the mosaic layer. The input must specify which item is being processed, either selecting the item or specifying the ObjectID in the input. | Text File |
maximum_rms_value (Optional) | The amount of modeled error (in pixels) that you want in the output. The default is 0.5, and values below 0.3 are not recommended as this leads to overfitting. | Double |
Derived Output
Name | Explanation | Data Type |
out_raster | The output raster dataset. | Raster Dataset |
Code sample
RegisterRaster example 1 (Python window)
This is a Python sample for the RegisterRaster tool.
import arcpy
arcpy.RegisterRaster_management(
"\\cpu\data\nonref.tif", "REGISTER", "\\cpu\data\yesref.tif",
"\\cpu\data\links.txt", "POLYORDER1", "#")
RegisterRaster example 2 (stand-alone script)
This is a Python script sample for the RegisterRaster tool.
# Register raster using only control points
import arcpy
arcpy.env.workspace = "C:/Workspace"
rdname = "irs_ps.img"
mode = "REGISTER"
refrd = ""
linkfile = "C:/Workspace/irs_controls_13.txt"
order = "POLYORDER2"
arcpy.RegisterRaster_management(
rdname, mode, refrd, linkfile, order)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes