You are here: Common Commands > Common Raster Commands

Common Raster Commands

Lossless Compression

The following command compresses a TIFF image to MrSID Generation 4 using lossless compression:

mrsidgeoencoder -i foo.tif -o foo.sid -of mg4 -lossless

Setting a Compression Ratio

The following command compresses a TIFF image to MrSID Generation 4 using a 20:1 compression ratio:

mrsidgeoencoder -i foo.tif -o foo.sid -of mg4 -cr 20

Creating a Test Image

The following image creates a watermarked test image that does not deduct from the data cartridge:

mrsidgeoencoder -i foo.tiff -testencode -o foo.sid

Cropping the Sides of an Image

The following command crops 500 pixels from each side of an image:

mrsidgeoencoder -i foo.sid -o foo_crop.sid ‑cropleft 500 ‑cropright 500 ‑croptop 500 ‑cropbottom 500

The following command defines upper left X and Y coordinates for a crop region, and sets the width and height of the crop region to 4000 by 4000 pixels:

mrsidgeoencoder -i foo.sid -o foo_crop.sid ‑cropulxy 500 500 ‑cropwh 4000 4000

Despeckling

The following command removes speckling artifacts from an image that has been compressed using lossy compression:

mrsidgeoencoder -i foo.tif -o foo.sid ‑of mg4 ‑cr 20 ‑despeckle true

Reprojecting

The following command changes the projection of an image from one EPSG to another:

mrsidgeoencoder -i foo.tif -o foo.sid ‑fromepsg 4326 ‑toepsg 26718

Creating a Flat Mosaic

The following command uses a mosaic list file to create a flat mosaic:

mrsidgeoencoder -i mosaic.mos ‑mos ‑o mosaic.sid

The file with a .mos extension is the mosaic list file. The following lines display the contents of a sample mosaic list file for a given set of georeferenced images:

Creating/Updating a Composite Mosaic

The following command uses a mosaic list file to create a composite mosaic:

mrsidgeoencoder -i tiles.mos ‑o outputcomposite.sid ‑composite

The file tiles.mos is the mosaic list file. For a composite mosaic, the files listed must all be MG3 or MG4 files. The following is an example mosaic list file:

This operation was formerly referred to as updating a mosaic.