Erdas: Expanding and Compressing Rasters

 

Manipulating Raster for common applications: Expanding & Compressing Raster Data

 

As a GIS user, you are undoubtedly aware of the ever increasing amount of raster data (i.e. georeferenced images, map output, etc.) accumulating in your user directory. In most cases, the imagery employed in your GIS project is used as a basemap for digitizing vector data or as a backdrop for visualization. If this is the case, consider changing the raster format to make your projects portable.

 

COMPRESSING DATA I

Advanced RGB cluster

On the Imagine command bar

-Click on Image interpreter...>Utilities> Adv. RGB Clustering...

On the RGB cluster panel

-Click on folder icon > select input file>press OK twice.

-Click Load Image Data command button. Image is mapped according to Partition Data settings.

-Click on the Partition Data tab> click on optimize threshold for 256 classes> Build LUT > tab resets at Image I/O.

-Type in output filename> click on Produce Output command button.

 

COMPRESSING DATA II

Export to JP2

On the Imagine command bar

-Click on Import icon

On the Import/Export panel

-Enable the Export radio button > change Type: GeoJP2 > select input > create output > Press OK twice. Spawns Export GeoJP2 panel.

-Modify the compression type if need be (note: lossless is 1/2 the original size without data loss) > Press OK to proceed.

 

EXPANDING DATA

 

Convert single band "thematic" images to 3-band images

Copy the following script into a text editor> Save as... all files *.gmd.

Run Imagine.

-On the command bar

-Click Modeler

-File > Open... (defaults at models directory)> navigate to your *.gmd file>Press OK.

 

PAGESIZE 6, 8 INCHES;

CELLSIZE MINIMUM;

PRINTERPAGESIZE 8.5, 11;

MARGINS 0.5, 0.5, 0.5, 0.5;

ORIENTATION PORTRAIT;

PRINTSCALE 100;

WINDOW INTERSECTION;

PROJECTION DEFAULT;

AOI NONE;

OPTIMIZE NO;

RASTER {

ID 1;

TITLE "n1_PROMPT_USER";

POSITION 0.722222, 0.9;

PROMPT;

INTERPOLATION NEAREST;

THEMATIC;

DATATYPE UNSIGNED8;

DECLARE "Integer";

COMPRESSION UNCOMPRESSED;

COORDINATES MAP;

AOI NONE;

RECODE NO;

CHILD 2;

}

FUNCTION {

ID 2;

TITLE "LOOKUP ";

POSITION 1.74444, 2.37778;

VALUE "LOOKUP ($n1_PROMPT_USER, ($n1_PROMPT_USER::COLORTABLE) * 255)";

AREA UNION;

CHILD 3;

}

RASTER {

ID 3;

TITLE "n3_PROMPT_USER";

POSITION 2.64444, 3.84444;

PROMPT;

DELETEFILE;

INTERPOLATION NEAREST;

ATHEMATIC;

DATATYPE UNSIGNED8;

DECLARE "Integer";

COMPRESSION UNCOMPRESSED;

COORDINATES MAP;

RECODE NO;

}

 

Back to Reference Pages