You are here: Command Line Applications > mrsidgeometa

mrsidgeometa

The mrsidgeometa tool is a simple metadata editor.

By default the mrsidgeometa tool is installed in the following directory:

C:\Program Files\LizardTech\GeoExpress95\bin

Switches

mrsidgeometa Switches
Switch Value Notes
-file/-f string Name of input file (required).
-tempDir/-t string Name of temporary directory to use.
-tpc string Set values for transparency metadata.
-define/-d string "name=value" string.
-remove/-r string Remove 'tagname' string.
-rtpc   Remove transparency metadata.
-addWL/-awl float0 float1 Add window/level metadata.
-removeWL/-rwl   Remove window/level metadata.
-generateDR/-gdr string Calculate dynamic range information from the image statistics and write the dynamic range to the metadata. See possible values below.
-removeDR/-rdr   Remove dynamic range metadata.
-addAffine/-aa float0 float1 float2 float3 float4 float5 Add Affine Transformation (world file order).
-removeAffine/-ra   Remove Affine Transformation.
-addWKT/-awkt strings Add well known text string (WKT). See possible values below.
-removeWKT/-rwkt   Remove well known text string (WKT).
-template/-tm   Template file containing options.
-worldFile/-wf   Import world file.
-jp2_tlm unsigned int Set the maximum number of tile length markers. Acceptable range: 0-255. Specify zero to disable.
-jp2_plt   Use packet length markers.
-jp2_noplt   Do not use packet length markers.
-jp2_tilePart   Set tile parts. Acceptable values: C|L|R|None.
-h/-?   Show short usage message.
-help  

Show detailed usage message.

-version/-v   Show version information.
-verbose   Enable verbose output (diagnostics).

Dynamic Range Generation Methods

When you generate dynamic range metadata, you must enter a dynamic range generation method.

You can enter one of the following methods for generating the dynamic range:

rgb

Calculate the minimum and maximum dynamic range values for an image with red, green, and blue bands. Select the rgb method to minimize color shifting for RGB images. When you select the rgb method, GeoExpress calculates the combined dynamic range of the red, green, and blue bands.

merge

Calculate the minimum and maximum dynamic range values for an image with multiple bands. Select the merge method to preserve the proportions of pixel values across bands. For example, if you want to compare multiple bands in a multispectral image, you may want to select the merge method. When you select the merge method, GeoExpress calculates the combined dynamic range of all bands.

per-band

Calculate the minimum and maximum dynamic range values for an image with one or more bands. Select the per-band method to calculate the dynamic range of each band individually. For example, if you have a multispectral image and you only want to view one band at a time, select the per-band method. When you select the per-band method, GeoExpress calculates the dynamic range of each band separately.

Automatic and Strict Dynamic Range

For all images except for 16-bit images with unsigned integer data, GeoExpress uses the exact dynamic range values from the dynamic range generation method that you select. For 16-bit images with unsigned integer data, GeoExpress automatically modifies the calculated dynamic range values to minimize color shifting.

The modified or automatic dynamic range sets the maximum dynamic range value to the estimated bit-depth and sets the minimum dynamic range value to zero.The estimated bit-depth is the next whole number of bits that contains the calculated maximum value in the image. For example, if the maximum value in the image is 3950, GeoExpress estimates that the image was taken with a 12-bit camera and sets the maximum value to 4095. Because GeoExpress sets a wider dynamic range for the image, you can minimize color shifting when you display the image.

For 16-bit images with unsigned integer data, you can force GeoExpress to use the exact dynamic range values calculated by GeoExpress rather than the modified dynamic range values. To use the exact dynamic range values calculated by GeoExpress, append -strict to the dynamic range generation method that you select. For example, you might change the dynamic range generation method to merge-strict

Well-Known Text String Types

When you add a well-known text string (WKT), you can specify the WKT in one of three ways.

OGC WKT as a string

You can specify the WKT in OGC standard format:

mrsidgeometa -f input.sid -awkt "GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]"

Note that all the text needs to be entered as one continuous line. Be careful to balance quote marks correcctly.

EPSG code

You can also specify the WKT using a standard EPSG code:

mrsidgeometa -f input.sid -awkt EPSG:4326

Text file

You can pass an OGC WKT in a text file:

mrsidgeometa -f input.sid -awkt wkt.txt

where wkt.txt is a text file containing the WKT string.

Examples

Following are some examples of usage.

The following command adds a USER:: metadata value to "lena-jp2.jp2":

mrsidgeometa -f lena-jp2.jp2 -d OnePlusOne=Two

The following command deletes the tag you just added:

mrsidgeometa -f lena-mg3.sid -d OnePlusOne=Two

The following command adjusts the dynamic range of the file to a window of 123.456 centered at the level value of 67.89:

mrsidgeometa -f lena-jp2.jp2 -awl 123.456 67.89

The following command removes the dynamic range adjustment you just made, returning it to the “natural” dynamic range based on the pixel depth:

mrsidgeometa -f lena-jp2.jp2 -rwl

The following command sets the georeference coordinates of the file to those specified in the world file “lena-jp2.j2w” (in the same directory as the .jp2 file):

mrsidgeometa -f lena-jp2.jp2 –wf

The following command removes an existing metadata tag (in this case a non-USER:: tag).

mrsidgeometa -f nokia-jp2.jp2 -r ICC::Profile

The following command generates exact minimum and maximum dynamic range values for an RGB image:

mrsidgeometa -f 4band.sid -gdr rgb-strict