English

Problem: Black corners on an image or grid in ArcInfo

Description

When an image or a grid is georeferenced, a black background appears in the corners. If it is displayed with adjacent images the black areas cover up part of the other image. This is an undesirable effect for display and plotting.

Cause

The process of georeferencing an image or a grid often involves some level of rotation. Because an image or grid must always be a perfect rectangle, after the rotaion, the background areas that have no data are filled in with zeroes, which appear as black.

Solution or Workaround

Most of these solutions require converting an image to GRID format, if it is not in this format already. This is done with the IMAGEGRID command. You will also need a GRID or ArcScan license to manipulate the grid, though some operations can be done with a TIN license as well. If you do not have GRID or TIN or ArcScan, and you have only one image to display (not several adjacent ones) you could create a polygon or polygons covering the black areas and shade them in white after drawing the image or grid, covering up the undesirable color. Otherwise, you may wish to look to a third party graphics or image editing program to join adjacent images that overlap, then bring them back into ARC/INFO.

If a GRID license is available, a new grid may then be created with the black areas converted to NODATA, using a command such as:

Code:
new_grid_name = setnull(existing_grid eq 0,existing_grid)

This must be done in GRID. If TIN is available, you can use the LATTICECLIP command to clip a grid with a polygon coverage, setting border areas to NODATA. A similar command in GRID is the SELECTPOLYGON function. While these both require defining a polygon coverage showing the area to be clipped out, they have the advantage of not altering any pixels in the interior of the grid, which may or may not be a problem, as discussed below.

In either case, the display of NODATA can now be controlled with the GRIDNODATASYMBOL command. For on-screen display, GRIDNODATASYMBOL TRANSPARENT will make NODATA display transparently, so it will not cover up adjacent grids. Note that this feature is not available for plotting (hardcopy). You can specify GRIDNODATASYMBOL WHITE to make the NODATA areas come out white or another desired color, and this will work for plotting as well as on the screen.

GRIDNODATASYMBOL WHITE may be undesirable if there are pixels within the image with the value 0, since they will be converted to NODATA along with the border pixels if you used the SETNULL statement above, and thus they will come out white instead of their correct black color. In such a case it is possible to convert only those pixels in a certain area, using the functionality of GRID or ArcScan. The following commands should be run from GRID if you have GRID, or from Arcedit if you have ArcScan.

Code:
mape mygrid
ge edit mygrid
ge drawing on
ge colors gray
ge draw /* or DRAW in Arcedit
ge fillvalue NODATA /* or another value
ge fillregion *

/* point to one of the background areas to be filled in and click the
/* first mouse button. If it only fills in part and gives a message about
/* the limit being reached, just repeat the fillregion until the area is
/* filled. When you are done, save your edits.

ge save

/* See the list of "Editing commands" under the "Functional list of GRID
/* commands", or Grid Editing under ArcScan for more information on the GE commands.