ExtendedFileName

From OTBWiki
Jump to: navigation, search

DEPRECATED: Please check the Software Guide for update documentation about Extended filename for reader and writer


Syntax

The reader and writer extended file name support is based on the same syntax, only the options are different.


To benefit from the extended file name mecanism, the following syntax is to be used:


Path/Image.ext?&key1=<value1>&key2=<value2>


IMPORTANT: Note that you'll probably need to "quote" the filename.

Reader

Available Options:

&geom=<path/filename.geom>

  • Contains the file name of a valid geom file.
  • Use the content of the specified geom file instead of image-embedded geometric information.
  • empty by default, use the image-embedded information if available.

&sdataidx=<(int)idx>

  • Select the sub-dataset to read.
  • 0 by default.

&resol=<(int)resolution factor>

  • Select the JPEG200 sub-resolution image to read.
  • 0 by default.

&skipcarto=<(bool)true>

  • Skip the cartographic information:
  • Clears the projectionref, set the origin to [0;0] and the spacing to [1/max(1;resolution factor);1/max(1;resolution factor)].
  • Keeps the keyword list.
  • false by default.

&skipgeom=<(bool)true>

  • Skip geometric information:
  • Clears the keyword list,
  • Keeps the projectionref and the origin/spacing informations.
  • false by default.

&skiprpctag=<(bool)true>

  • Skip the reading of internal RPC coefficients
  • false by default.

Writer

Available Options:

&writegeom=<(bool)false>

  • To activate writing of external geom file.
  • true by default.

&gdal:co:<GDALKEY>=<VALUE>

  • To specify a gdal creation option.
  • For gdal creation option information, see dedicated gdal documentation.
  • None by default

&streaming:type=<VALUE>

  • Activates configuration of streaming through extended filenames
  • Override any previous configuration of streaming
  • Allows to configure the kind of streaming to perform
  • Available values are:
    • auto : tiled or stripped streaming mode chosen automatically depending on TileHint read from input files
    • tiled : tiled streaming mode
    • stripped : stripped streaming mode
    • none : explicitly deactivate streaming
  • Not set by default

&streaming:sizemode=<VALUE>

  • Allows to choose how the size of the streaming pieces is computed
  • Available values are:
    • auto  : size is estimated from the available memory setting by evaluating pipeline memory print,
    • height : size is set by setting height of strips or tiles
    • nbsplits : size is computed from a given number of splits
  • Default is auto

&streaming:sizevalue=<VALUE>

  • Parameter for size of streaming pieces computation
  • Value is :
    • if sizemode=auto : available memory in Mb
    • if sizemode=height : height of the strip or tile in pixels
    • if sizemode=nbsplits : number of requested splits for streaming
  • If not provided, the default value is set to 0 and result in different behaviour depending on sizemode (if set to height or nbsplits, streaming is deactivated, if set to auto, value is fetched from configuration or cmake configuration file).


&box=<startx>:<starty>:<sizex>:<sizey>

  • User defined parameters of output image region
  • The region must be set with 4 unsigned integers (the separator used is the colon ':'). Values are:
    • startx: first index on X
    • starty: first index on Y
    • sizex: size along X
    • sizey: size along Y
  • The definition of the region follows the same convention as itk::Region definition in C++. A region is defined by two classes: the itk::Index and itk::Size classes. The origin of the region within the image with which it is associated is defined by Index.

Limitations / Known Issues

Available syntax for boolean

  • ON, On, on, true, True, 1 are available for setting a 'true' boolean value.
  • OFF, Off, off, false, False, 0 are available for setting a 'false' boolean value.

Usage:

- lib:

Supported in:

  • otbImageFileReader
  • otbImageFileWriter

- Applications:

Supported

  • InputImage
  • OutputImage
  • Qt apps

Not Supported:

  • InputImageList

- Monteverdi:

Supported

  • Monteverdi -in

Todo

  • Support of ROI box definition in writer in progress. But with streaming
  • Support of srcwin in reader (SetIORegion l.147/148 in otbImageFileReader + modify the OutputImage region)
  • Support of streaming mode and parameter in writer