You are here: Advanced Encoding and Tools > Reprojection > Reprojecting Images

Reprojecting Images

GeoExpress allows images to be reprojected from one coordinate reference system (CRS) to another. The output formats that support reprojection are MG3, MG4, JPEG 2000 (JP2) and NITF* 2.1.

Both a source and an output CRS must be specified for a reprojection operation. You may enter any CRS defined by the European Petroleum Survey Group (EPSG). Alternatively, you can enter a well-known text string (WKT) that describes the coordinate system.

NOTE: If you create a mosaic from images in different projection systems, you do not need to specify an input coordinate reference system with the -fromepsg switch. For more information on mosaics with multiple projections, see Creating a Mosaic.

The error fraction is a value from 0.0 to 1.0 that indicates the level of accuracy of the reprojection. A value of 0.0 is the highest level of accuracy – basically a "lossless" reprojection. An error fraction of 0.125 means that each reprojected pixel could be off by an eighth of a pixel, while a value of 0.25 indicates the allowance of a quarter pixel inaccuracy.

Of the resampling methods, nearest neighbor is the fastest method, while bicubic gives more accurate results. Bilinear offers a compromise, faster than bicubic but more accurate than nearest neighbor.

Use the -reprores flag to change the x and y output resolution of the reprojected image. If you manually set the resolution and you notice that the image is offset, you may want to use the -alignpixels switch. For more information, see Encoding Options.

NOTE: Reprojection is an encoding operation, meaning that compressed file formats such as MrSID and JPEG 2000 will be decompressed and re-encoded during the reprojection operation, which could result in a loss of image quality.

*Support for encoding NITF images is available for GeoExpress. Contact your LizardTech representative to purchase the NITF Extension for GeoExpress.

Example

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

Reprojection Switches

Reprojection Switches
Switch Value Notes
-fromepsg sint Specifies the EPSG code describing the input image's coordinate reference system.
-fromwkt string Specifies a text file containing a WKT that describes the input image's coordinate reference system.
-toepsg sint Specifies the EPSG code describing the output image's desired coordinate reference system.
-towkt string Specifies a text file containing a WKT that describes the output image's desired coordinate reference system.
-reprores float0 float1 Specifies the x and y resolutions for a reprojected image. You may want to use this switch in conjunction with -alignpixels.
-reproerror float Specifies the desired error fraction for a reprojection operation. Acceptable values range from 0.0 to 1.0.
-reproblocksize sint

Alternatively -rbs. Sets the reprojection blocking value. Use smaller values for larger images.

Default: 2048.

-reproresample string

Sets the resampling method for a reprojection operation. Accepted values are:

nearest – nearest neighbor resampling

bilinear – bilinear resampling

bicubic – bicubic resampling

Default: nearest.

-repronotempfile   Specifies that GeoExpress should not use temp files for reprojection operations. By default temp files are used.