Express Server includes several command line tools, located in <Express Server installation directory>/ImageServer/bin.
The mrsidgeometa
tool adds and removes user metadata from MrSID images. User metadata stored in MrSID images is published by the Express Server as properties. For example, each of the sample MrSID images included in the Express Server distribution includes values for the user metadata tags Name and Description. These appear in the Express Server XML output as properties.
The mrsidgeometa
command can be used to add, edit, and remove user metadata elements from MrSID images.
For example, the following adds a user metadata tag "Author
" to the image sample.sid
:
$ mrsidgeometa -f sample.sid -d Author="Joe Smith"
The isindex
tool is used to create and maintain a Spatial Index associated with an Express Server catalog. Catalogs that are configured with a Spatial Index are published as WMS layers. This section describes the most common operations relating to a spatial index. For more detailed information, run the following command:
$ isindex -help
Before running any of the command line tools on Unix, you must
The syntax for creating a spatial index is:
$ isindex -create -c <catalog> -s <srs-name>
For example, the following command will create a spatial index for the catalog Foo
, with the Spatial Reference System epsg:4326.
$ isindex -create -c Foo -s EPSG:4326
To create an index for a LiDAR cataog, the syntax is:
$ isindex -create -c <catalog> -l
NOTE: In order to create a spatial index for an Express Server catalog, the catalog must be configured to use a spatial index. For more information see "Configuring the Catalog".
The syntax for updating all entries in a spatial index is
$ isindex -update -c <catalog>
For example, the following command will examine the catalog Foo
, adding/removing/modifying all entries in the index as appropriate.
$ isindex -update -c Foo
The isindex
tool includes the ability to generate an overview image. An overview image is a single MrSID image encoded from low-resolution scenes of all the component images. Adding an overview image to a catalog will significantly improve performance for low-resolution requests. For example, without an overview image, a catalog that contains 4000 images will need to decode pixels from each of those images to produce a 640x480 scene of the entire dataset. This may require several minutes. When an overview image is added, however, the same request will access only one image, returning a result in a few seconds or less.
Overview management is accomplished via the following syntax:
To generate or update the overview:
$ isindex -overview update -c <catalog> [-xres <ground-units>] [-yres <ground-units>]
If the optional xres or yres are supplied, then the overview will be encoded at that resolution. Otherwise it will be encoded at 32 x the base resolution of the index.
NOTE: The time required to generate an overview varies with the number of images in a spatial index. For extremely large catalogs this may take more than an hour.
NOTE: When you create or update an overview for a catalog that is part of a multicatalog, that multicatalog is unavailable until the overview is completed.
To remove the overview:
$ isindex -overview remove -c <catalog>
The syntax for listing the contents of a spatial index is:
$ isindex -list -c <catalog>
For example, the following command lists the contents of the Spatial Index for the catalog "Foo".
$ isindex -list -c Foo
Optimizing PDFs
You can use isindex
to optimize Geospatial PDFs for faster delivery.
The syntax for optimizing PDFs is:
$ isindex -ingest -c <catalog>
For example, the following command optimizes the images in the catalog "Foo".
$ isindex -ingest -c Foo
Optimized files are stored in <Express Server installation directory>/ImageServer/var/ingested-data.
spindex
If Express Server or isindex
hangs when you try to run it, it may have remained locked after a previous use. In this case, using the spindex
tool may recover the application in a clean (unlocked) state.
NOTE: spindex
must be run as root
on Unix systems.
spindex
Run the following commands from the root directory of the Express Server (by default the root directory is /opt/LizardTech/ImageServer
).
$ source etc/env.sh
$ ./bin/spindex -recover -p var/catalog-data/<catalog name>/\{D090DD8B-3D12-4631-9787-0DC2CACDC3EA\}
$ chown nobody:nobody var/catalog-data/<catalog name>/\{D090DD8B-3D12-4631-9787-0DC2CACDC3EA\}/__db.*
NOTE: Because the -recover
option recreates the log files in the spatial index, you must change the ownership of those files back to the account they were assigned before the operation. By default the account value is nobody
.
The mrsidgeoinfo tool displays basic information about an image, such as width, height, etc. Various image formats are supported.
Switch | Value | Notes |
---|---|---|
-inputformat/-if | string |
Identifies the input file format. Accepted values are:
|
-mosaic/-mos | Identifies the input file as an AUX file of mosaic images. Using the -mosaic switch creates a flat output file. |
Switch | Value | Notes |
---|---|---|
-metadata/-meta | Show metadata tags and values | |
-tiles/-tile | Show tile information (composite MG3 only) | |
-genProfile/-prof | string | Generate JP2 profile |
-worldFile/-wf | Generate world file | |
-ignoreWorldFile/-ignorewf | Ignore georeferencing from world files | |
-tfwOverride/-tifw | Use .tfw file (for TIFF images only) |
|
-projectDims/-dims | Show image dimensions at various resolution levels | |
-wkt | Display any well-known text string (WKT) information for the image | |
-aoi | Display any area of interest (AOI) information for the image | |
-inputFile/-input | string | Name of input file (required) |
Switch | Value | Notes |
---|---|---|
-h/-? | Show short usage message | |
-help |
Show detailed usage message |
|
-version/-v | Show version information | |
-credits | Show credits and copyrights | |
-quiet | Don't show informational message | |
-log | string | Write output to log file |
-progress | string |
Progress meter style. Acceptable values:
|
In the following example, the command displays the basic image information for a MrSID image named "image.sid":
mrsidgeoinfo image.sid
In the following example, the command line displays the basic image information and the metadata for a TIFF image named "foo.tif":
mrsidgeoinfo –meta foo.tif
In the following example, the command line displays metadata information for an AUX file containing JPEG format images named "mosaic.txt":
mrsidgeoinfo –mos –if jpg mosaic.txt