English

How To: Mosaic raster images (with colormaps) using the SDERASTER command

Summary

Instructions provided describe how to load and mosaic the rasters without their colormaps and apply the colormap after the mosaicking has completed using ArcSDE mosaics.

Procedure

To successfully mosaic raster images using ArcSDE's sderaster command, the following conditions must be met:

-- All the rasters must have the same data bit depth.

-- All the rasters must have the same number of bands.

-- The rasters cannot have a colormap present.

-- The existing raster in the database must have a spatial reference.

-- All the rasters must have the exact pixel registration.

-- All the rasters must have the same cell size.

Note:
With a mosaic image that contains colormaps, the assumption is that one colormap is applied to all images. If all the images for mosaics do not have the same colormap, image pre-processing will be required.


Follow the steps below to mosaic raster images (with colormaps) using the SDERASTER command:

  1. Use ArcCatalog to check if the spatial reference information is present and the same for all images. If not present, add the spatial reference using ArcCatalog.
  2. Load the first image using the 'sderaster -o import ...' command.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o import -l colormap_mosaic,raster -f o35077g8.tif -c lz77 -L 0 -g -G 0 -i 5151 -u testuser -p testpswd
    Note:
    The only raster image formats that can be used with the sderaster command are TIFF (Tag Image File Format) and BSQ (Band Sequential) - no other raster image formats are supported with the sderaster command.

  3. Use 'sderaster -o colormap ...' command with the '-d' option to delete the existing colormap from the ArcSDE Raster Dataset just created.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o colormap -l colormap_mosaic,raster -i 5151 -u testuser -p testpswd -v 1 -d

  4. Mosaic additional images to the ArcSDE Raster Dataset using the 'sderaster -o mosaic ...' command and include the '-N' option in the syntax.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o mosaic -l colormap_mosaic,raster -f o35077g7.tif -L -0 -i 5151 -u testuser -p testpswd -v 1 -N

  5. When all images have been mosaicked, use the 'sderaster -o colormap ...' with the '-f <image file>' option to apply the colormap back to the ArcSDE Raster Dataset.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o colormap -l colormap_mosaic,raster -i 5151 -u testuser -p testpswd -v 1 -f o35077g7.tif

  6. Build pyramids on the ArcSDE Raster Dataset using the 'sderaster -o pyramid ...' command.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o pyramid -l colormap_mosaic,raster -i 5151 -u testuser -p testpswd -v 1 -L -1 -I
    nearest

  7. If the ArcSDE Raster Dataset appears black when previewed in ArcCatalog, use the 'sderaster -o stats ...' command to build Image Statistics.
    ~~~~~~~
    EXAMPLE :
    ~~~~~~~
    E:\Raster_Data\Formats\TIFF\colormap> sderaster -o stats -l colormap_mosaic,raster -i 5151 -u testuser -p testpswd -v 1

  8. Lastly, analyze the ArcSDE Raster Dataset using either ArcCatalog's 'Analyze' tool, the 'sdetable -o update_dbms_stats ...' command or RDBMS tools. This step updates the database statistics, which are used in the Oracle Cost Based Optimizer to work out the best execution plan for the SQL. Failing to do this step may cause poor performance when using the raster dataset.
    Note:
    Additional information is provided in the resources listed below; it is highly recommended that these be read before proceeding.

Related Information