RegisterImage()
Summary
Registers an image to a particular location, scale, and projection.
Changes
Added other image types in Version 6.0/2012.
Syntax
error_array = RegisterImage(string layer_name, array image_points, array map_points, array options)
| Argument | Contents |
|---|---|
| layer_name | The name of the image layer to be registered |
| image_points | An array of coordinates that indicate the location of control points on the map containing the raster image |
| map_points | An array of coordinates that indicate the true, correct location of each of the control points |
| Option | Type | Contents |
|---|---|---|
| Pixels | Boolean | If "True" the coordinates in image_points are actually the x, y pixel location of control points in the image. In this case, image_points and map_points must contain exactly three control points. This option is useful when the exact location of corners of the image is known. |
Returns
An array of real numbers, indicating the magnitude of the error of the location of each control point. The errors are measured in map units.
Notes
-
The projection of the current map is used for the purpose of the registration.
-
The registration does not take rotation into account. For an image to register properly it needs to be oriented "projection" north.
-
RegisterImage() works on TIFF, JPEG, MrSID, or PNG image files.
-
RegisterImage() writes additional information to a reserved portion of the header of the TIFF file. This information does not affect any other use of the file. The file must be writable for the registration to occur.
-
RegisterImage() adds registration information that is not normally part of a TIFF (.tfw), JPEG (.jpw), MrSID (.sdw), and PNG (.pgw) world file, and updates the registration information in a world file when you reregister an image.
Error Codes
| Error Type | Meaning |
|---|---|
| Error | Unable to write registration information to the TIFF file, or the image registration points are invalid |
| NotFound | The specified layer does not exist |
See Also
| Function | Summary |
|---|---|
| GetImageFileInfo() | Gets information about a raster image file |
| IsImageRegisterable() | Checks to see if an image can be registered |
| UnRegisterImageFile() | Removes registration information from a TIFF image file |