wiki:orthoigen

Version 9 (modified by pborissow, 14 years ago) ( diff )

--

orthoigen

orthoigen is a command line application used to orthorectify, mosaic, and convert raster data between different formats. It provides a number of operations including subsetting, resampling, histogram matching, and reprojection of data. orthoigen is built on top of igen but it doesn't require a keyword list.

Usage

ossim-orthoigen [options] <input_file1> <input_file2> ... <output_file>

Options

  --annotate                              annotation keyword list
  --chain-template                        Specify an external file that contains
                                          chain information
  --clip-to-valid-rect <true|false>       When true, any requested cut rect is
                                          clipped by the valid image bounding
                                          rect to minimize null border pixels.
                                          If false, the output will correspond
                                          to the cut rect as close as possible
                                          given the product projection. This
                                          option overrides the ossim_preferences
                                          setting. If no cut options are
                                          supplied, this option is ignored.
  --combiner-template                     Specify an external file that contains
                                          combiner information
  --combiner-type                         Specify what mosaic to use,
                                          ossimImageMosiac or ossimFeatherMosaic
                                          or osimBlendMosaic ... etc
  --cut-bbox-en                           Specify the min easting, min northing,
                                          max easting, max northing
  --cut-bbox-ll                           Specify the min lat and min lon and
                                          max lat and maxlon <minLat> <minLon>
                                          <maxLat> <maxLon>
  --cut-center-ll                         Specify the center cut in lat lon
                                          space.  Takes two argument <lat> <lon>
  --cut-pixel-width-height                Specify cut box's width and height in
                                          pixels
  --cut-radius-meters                     Specify the cut distance in meters.  A
                                          bounding box for the cut will be
                                          produced
  --disable-elev                          Will disable the elevation
  --disable-notify                        Takes an argument. Arguments are ALL,
                                          WARN, NOTICE, INFO, FATAL, DEBUG.  If
                                          you want multiple disables then just
                                          do multiple --disable-notify on the
                                          command line.  All argument are case
                                          insensitive.  Default is all are
                                          enabled.
  --disable-plugin                        Will disable the plugin loader
  --enable-entry-decoding                 A filename can be separated by a | and
                                          a number (NO space).
                                          Example: a.toc|0 will do entry 0 of
                                          a.toc file and on unix you might want
                                          to use a \ since
                                          the separator is a pipe sign. Example:
                                          ./a.toc\|0 will do entry 0 of a.toc.
  --geo                                   Defaults to a geographic image chain
                                          with GSD = to the input.  Origin of
                                          latitude ison the equator.
  --geo-scaled                            Takes a latitude as an argument for
                                          purpose of scaling.  Specifies that no
                                          spec file was defined.  Defaults to a
                                          scaled geographic image chain with GSD
                                          = to the input.
  --hist-auto-minmax                      uses the automatic search for the best
                                          min and max clip values. Incompatible
                                          with other histogram options.
  --hist-match                            Takes one image filename argument for
                                          target histogram to match.
                                          Incompatible with other histogram
                                          options.
  --hist-std-stretch                      Specify histogram stretch as a
                                          standard deviation from the mean as
                                          <int>, where <int> is 1, 2, or 3.
                                          Incompatible with other histogram
                                          options.
  --hist-stretch                          Specify in normalized percent the low
                                          clip and then the high clip value as
                                          <low.dd> <hi.dd>. Incompatible with
                                          other histogram options.
  --input-proj                            Makes the view equal to the input.  If
                                          more than one file then the first is
                                          taken
  --mask                                  Specify the ESRI shape file with
                                          polygons to clip the image
  --meters                                Specifies an override for the meters
                                          per pixel. Takes a single value
                                          applied equally to x and y directions.
  --meters-xy                             Specifies an override for the
                                          meters-per-pixel. Takes two values <x>
                                          <y>
  --ossim-logfile                         takes a logfile as an argument.  All
                                          output messages are redirected to the
                                          specified log file.  By default there
                                          is no log file and all messages are
                                          enabled.
  --resample-type                         Specify what resampler to use, nearest
                                          neighbor, bilinear, cubic
  --scale-to-8-bit                        Scales output to eight bits if not
                                          already.
  --slave-buffers                         number of slave tile buffers for mpi
                                          processing (default = 2)
  --srs                                   specify an output reference
                                          frame/projection. Example: --srs
                                          EPSG:4326
  --stdout                                Output the image to standard out.
                                          This will return an error if writer
                                          does not support writing to standard
                                          out.  Callers should combine this with
                                          the --ossim-logfile option to ensure
                                          output image stream does not get
                                          corrupted.  You must still pass an
                                          output file so the writer type can be
                                          determined like "dummy.png".
  --supplementary-directory or --support  Specify the supplementary directory
                                          path where overviews, histograms and
                                          external geometries are located
  --tiling-template                       Specify an external file that contains
                                          tiling information
  --utm                                   Defaults to a utm image chain with GSD
                                          = to the input
  --view-template                         Specify an external file that contains
                                          view information
  --wkt                                   specify an output reference
                                          frame/projection that is in a wkt
                                          format.  Must have the
                                          ossimgdal_plugin compiled
  --writer-prop                           Passes a name=value pair to the writer
                                          for setting it's property.  Any number
                                          of these can appear on the line.
  --writer-template                       Specify an external file that contains
                                          tiling information
  -K                                      specify individual keywords to add to
                                          the preferences keyword list:
                                          name=value
  -P                                      specify a preference file to load
  -T                                      specify the classes to trace, ex:
                                          ossimInit|ossimImage.*
                                          will trace ossimInit and all
                                          ossimImage classes
  -V or --version                         Display version information.
  -h or --help                            Display this information
  -t or --thumbnail                       thumbnail size
  -w or --writer                          Specifies the output writer.  Default
                                          uses output file extension to
                                          determine writer.

Input Files

For orthoigen you must at a minimum specify an input and an output file. Example:

ossim-orthoigen C:\input.tif D:\output.jpg

Users can specify multiple input files like this:

ossim-orthoigen C:\input.tif C:\input2.tif C:\input3.tif D:\output.jpg

Alternatively, you can pass in a text file with a ".src" extension with a list of file paths separated by a newline. Example:

ossim-orthoigen image.src output.ntf

The corresponding image.src file would be as simple as this:

image0.file: C:\input1.tif
image1.file: C:\input2.tif
image2.file: C:\input3.tif

Output Format

By default, the output writer type is determined by the extension of the output file. You can specify a specific writer to use via the -w argument. You may also pass in writer specific parameters via the --writer-prop argument. Example:

ossim-orthoigen -w ossim_kakadu_jp2 --writer-prop threads=4 --writer-prop compression_quality=visually_lossless --srs EPSG:4326 N10-E024.tif N10-E024.jp2

Normally orthoigen outputs a physical file but there is a way to redirect the output to the standard output stream. This is particularly useful if you want to create a composite application like a web map server. Currently the output writer is selected from the output file's extension so you must supply a dummy arg. Example:

ossim-orthoigen --stdout input.ntf dummy.png

It is recommended that you use the log file option to avoid corrupting the image stream from any program output (see --ossim-logfile).

Output Projection

orthoigen provides users several options for defining the output projection. The options are summarized below. If none of these options are used, orthoigen will default to the projection of the input file. If multiple input files are supplied, orthoigen will use the projection of the first image in the image chain.

  • srs: Allows users to specify a PCS or EPSG code for the output image. For example, to set the output projection to NAD83/UTM zone 12N, specify the following:
    orthoigen --srs EPSG:26912 <input files> <output>
    
  • geo: Sets the output projection to WGS84. This is identical to "--srs EPSG:4326". Example:
    orthoigen --geo <input files> <output>
    
  • wkt: Sets the output projection using well known text (wkt). Example:
    orthoigen --wkt 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"]] <input files> <output>
    
  • Other methods:
    orthoigen --utm <input files> <output>
    orthoigen --geo-scaled <latitude> <input files> <output>
    orthoigen --input-proj <input files> <output>
    orthoigen --view-template view_template/utm_8.kwl <input files> <output>
    

Histogram Operations

There are 4 different histogram operations available to create an output image. The options are mutually exclusive.

  • hist-auto-minmax uses the automatic search for the best min and max clip values.
  • hist-match Takes one image filename argument for target histogram to match.
  • hist-std-stretch Specify histogram stretch as a standard deviation from the mean as <int>, where <int> is 1, 2, or 3.
  • hist-stretch Specify in normalized percent the low clip and then the high clip value as <low.dd> <hi.dd>.

Tiling Template

For now we have to enable a view when tiling

orthoigen --utm --tiling-template <template> <input files> <output>

Examples

  • ossim-orthoigen --geo -t 512 <sourceFile> <sourceFile_tn>
    creates an image in geographic projection that is at most 512 pixels on a side (output is tif) - used for thumbnail generation.
  • ossim-orthoigen --geo -t 512 --enable-entry-decoding <sourceFile>|<entryNumber> <sourceFile_tn>
    same as above but used to make a thumbnail for a specific entry in an RPF set.
  • ossim-orthoigen <sourceFile>|<band order> <outputFile>
    creates an image using the specified band order - e.g entering 2,4,6 will create an image using bands 2 4 & 6.
  • ossim-orthoigen --writer-prop FORMAT=<format> <sourceFile> <outputFile.kml or kmz>
    creates a super overlay used by Google Earth.
    If no format is specified the default is JPG. Otherwise user can specify "PNG".
    keys off file extension - kml or kmz.
  • ossim-orthoigen <srcFile> <outputFile>
    creates a product using the passed in src file.
  • ossim-orthoigen --srs <<outputFrame/Projection> <sourceFile> <outputFile>
    creates a product that specifies an output reference frame/projection (e.g. "--srs EPSG:4326")
  • ossim-orthoigen.exe --cut-bbox-ll <minLat> <minLon> <maxLat> <maxLon> --enable-entry-decoding <"sourceFile|0|1,2,3"> <outputFile>
    creates a product from image0 that uses bands 1, 2, and 3. Also specifies the bounding box coordinates of the source AOI
  • ossim-orthoigen --hist-std-stretch <standardDeviation> <sourceFile> <outputFile>
    perform a linear contrast stretch using a standard deviation (1, 2, or 3 std deviations).
  • orthoigen /data/sanfran_ccf/foo.ccf /data/sanfran_map/sanfran_map.tif output/blend.jpg --combiner-type ossimBlendMosaic -t 512 --utm BLEND thumbnail
  • orthoigen --chain-template chain_templates/landsat_projected_321.kwl --tiling-template tiling_templates/1024x1024.kwl --thumbnail 2048 --utm /data/p44r34/l71044034_03420000725_hrf.fst output/ 1024x1024 tiling
  • orthoigen --geo --tiling-template tiling_templates/orthoigen_srtm_3arc.kwl /data/ele1/DTED3arc/w100/n40.dt1 output/ SRTM 90 meter tiling
  • orthoigen --view-template view_template/utm_8.kwl /data/sanfran_ccf/foo.ccf output/utm8.jpg --thumbnail 1024

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.