Version 11 (modified by 11 years ago) ( diff ) | ,
---|
ossim-chipper
ossim-chipper is a command line application used to generate image products from single or multiple image inputs. This includes chipping in image space, format conversions, ortho-rectification, elevation products from raw dem, dted, and srtm data.
Usage:
$ ossim-chipper Usage: ossim-chipper [option]... [input-option]... <input-file(s)> <output-file> Note at least one input is required either from one of the input options, e.g. --input-dem <my-dem.hgt> or adding to command line in front of the output file in which case the code will try to ascertain what type of input it is. Available traces: -T "ossimChipperUtil:debug" - General debug trace to standard out. -T "ossimChipperUtil:log" - Writes a log file to output-file.log. -T "ossimChipperUtil:options" - Writes the options to output-file-options.kwl. Description: ossim-chipper Utility application for generating elevation products from dem data. Options: --2cmv-blue-output-source <source> Two color multi view source input for blue output. Either, old, new, or mp(min pix). Default=new. --2cmv-green-output-source <source> Two color multi view source input for green output. Either, old, new, or mp(min pix). Default=new. --2cmv-new-input-band <band> Band to use for two color multi view new input. --2cmv-old-input-band <band> Band to use for two color multi view old input. --2cmv-red-output-source <source> Two color multi view source input for red output. Either, old, new, or mp(min pix). Default=old. --azimuth <azimuth> hillshade option - Light source azimuth angle for bump shade. Range: 0 to 360, Default = 180.0 --central-meridian <central_meridian_in_decimal_degrees> Note if set this will be used for the central meridian of the projection. This can be used to lock the utm zone. --color <r> <g> <b> hillshade option - Set the red, green and blue color values to be used with hillshade. This option can be used with or without an image source for color. Range 0 to 255, Defualt r=255, g=255, b=255 --color-table <color-table.kwl> hillshade or color-relief option - Keyword list containing color table for color-relief option. --cut-bbox-ll <min_lat> <min_lon> <max_lat> <max_lon> Specify a bounding box with the minimum latitude/longitude and max latitude/longitude in decimal degrees. Note coordinates are edge to edge. --cut-bbox-llwh <min_lat> <min_lon> <max_lat> <max_lon> <width> <height> Specify a bounding box with the minimum latitude/longitude, max latitude/longitude in decimal degrees and width/height in pixels. Note coordinates are edge to edge. --cut-center-llr <latitude> <longitude> <radius_in_meters> Specify the center cut in latitude longitude space with radius in meters. --cut-center-llwh <latitude> <longitude> <width> <height> Specify the center cut in latitude longitude space with width and height in pixels. --degrees <dpp_xy> | <dpp_x> <dpp_y> Specifies an override for degrees per pixel. Takes either a single value applied equally to x and y directions, or two values applied correspondingly to x then y. This option takes precedence over the "--meters" option. --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 --elevation <elevation> hillshade option - Light source elevation angle for bumb shade. Range: 0 to 90, Default = 45.0 --exaggeration <factor> Multiplier for elevation values when computing surface normals. Has the effect of lengthening shadows for oblique lighting. Range: .0001 to 50000, Default = 1.0 --histogram-op <operation> Histogram operation to perform. Valid operations are "auto-minmax", "std-stretch-1", "std-stretch-2" and "std-stretch-3". --input-dem <dem> Input dem to process. --input-img <image> Input image to process. --input-src <file.src> Input source file list keyword list with list of dems or images or both to process. --meters <meters> Specifies an override for the meters per pixel --op <operation> Operation to perform. Valid operations are "chip", "color-relief", "hillshade", "psm"(pan sharpened multispectral), "2cmv"(two color multi view) and "ortho". chip = input projection = output projection(image space), single image operation only. --options-keyword-list <options.kwl> This can be all or part of the application options. To get a template you can turn on trace to the ossimChipperUtil class by adding "-T ossimChipperUtil" to your command. --origin-latitude <latidude_in_decimal_degrees> Note if set this will be used for the origin latitude of the projection. Setting this to something other than 0.0 with a geographic projection creates a scaled geographic projection. --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. --output-radiometry <R> Specifies the desired product's pixel radiometry type. Possible values for <R> are: U8, U11, U16, S16, F32. Note this overrides the deprecated option "scale-to-8-bit". --projection <output_projection> Valid projections: geo, geo-scaled, input or utm geo = Equidistant Cylindrical, origin latitude = 0.0 geo-scaled = Equidistant Cylindrical, origin latitude = image center input Use first images projection. Must be a map projecion. utm = Universal Tranverse Mercator If input and multiple sources the projection of the first image will be used. If utm the zone will be set from the scene center of first image. NOTE: --srs takes precedence over this option. --reader-prop <string> Adds a property to send to the reader. format is name=value --resample-filter <type> Specify what resampler filter to use, e.g. nearest neighbor, bilinear, cubic, sinc. See ossim-info --resampler-filters --scale-to-8-bit Scales the output to unsigned eight bits per band. This option has been deprecated by the newer "--output-radiometry" option. --snap-tie-to-origin Snaps tie point to projection origin so that (tie-origin)/gsd come out on an even integer boundary. --srs <src_code> Specify an output reference frame/projection. Example: --srs EPSG:4326 --three-band-out Force three band output even if input is not. --writer-prop <writer-property> Passes a name=value pair to the writer for setting it's property. Any number of these can appear on the line. -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. -b or --bands <n,n...> Use the specified bands in given order: e.g. "3,2,1" will select bands 3, 2 and 1 of the input image. Note: it is 1 based -e or --entry <entry> For multi image handlers which entry do you wish to extract. For list of entries use: "ossim-info -i <your_image>" -h or --help Display this help and exit. -n or --north-up Rotates image North up. "chip" operation only. -r or --rotate <degrees> Rotate image by degrees. "chip" operation only. -t or --thumbnail <max_dimension> Specify a thumbnail resolution. Scale will be adjusted so the maximum dimension = argument given. -u or --up-is-up Rotates image to up is up. "chip" operation only. -w or --writer <writer> Specifies the output writer. Default uses output file extension to determine writer. For valid output writer types use: "ossim-info --writers" NOTES: 1) Never use same base name in the same directory! Example is you have a Chicago.tif and you want a Chicago.jp2, output Chicago.jp2 to its own directory. Example commands: // Simple file conversion: Convert geotiff to a jp2 file. ossim-chipperossim_kakadu_jp2 Chicago.tif outputs/Chicago.jp2 // Basic orthorectification: Orthorectify a nitf with RPC model out to a geotiff. ossim-chipper --op ortho 5V090205P0001912264B220000100282M_001508507.ntf outputs/ortho.tif // A two color multi view with cut box. First image is old, second image is new: ossim-chipper --cut-bbox-ll 28.092885092033352 -80.664539599998633 28.109128691071547 -80.626914963229325 --op 2cmv oldMLB.tif newMLB.tif outputs/2cmv-test1.tif // Ortho about point, 512x512, with histogram stretch, and 3,2,1 band order: ossim-chipper --op ortho -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf orth.tif // Chip, in image space, about point, 512x512, with histogram stretch, and 3,2,1 band order: ossim-chipper --op chip -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf chip.tif // Chip in image space, rotate "up is up"(-u option) about point, 512x512 with histogram stretch and 3,2,1 band order: ossim-chipper --op chip -u -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf up-is-up-chip.tif // Chip in image space, rotate 39 degrees (-r option) about point, 1024x1024, scaled to eight bit: ossim-chipper --op chip -r 39 --histogram-op auto-minmax --cut-center-llwh -42.883809539602893 147.331984112985765 1024 1024 --scale-to-8-bit 5V090205P0001912264B220000100282M_001508507.ntf outputs/r39.png // Above command where all options are in a keyword list: ossim-chipper --options-keyword-list r39-options.kwl
Exmple commands:
Color Relief
Color Relief is used to generate an RGB or ARGB representation of a dem. Different colors are used to represent elevation bands. Users will provide a template with corresponding colors values.
ossim-chipper --op color-relief --color-table template.kwl --srs EPSG:4326 input.src output.jpg
Command line without dot.src file with lots of options:
ossim-chipper -t 512 --resample-filter BILINEAR --op color-relief --color-table color-relief-lut1.kwl --output-radiometry U8 --writer-prop compression_quality=75 --writer-prop create_world_file=1 --writer-prop pixel_type=point --cut-bbox-ll 39.452331542969 -106.75654602051 40.507019042969 -105.43818664551 /data1/elevation/dted/level1/w107/n39.dt1 /data1/elevation/dted/level1/w107/n40.dt1 /data1/elevation/dted/level1/w106/n39.dt1 /data1/elevation/dted/level1/w106/n40.dt1 t1.tif
There is a color relief template on:
Hillshade
Hillshade is used to generate a shaded relief. It requires the following inputs:
- Sun Azimuth
- Sun Elevation
- Vertical Exaggeration
- Color (either RGB or Color Table)
Example:
ossim-chipper --op hillshade --azimuth 270 --elevation 45 --exaggeration 10 --color 222,229,188 --srs EPSG:4326 input.src output.jpg
Example with color table:
ossim-chipper --op hillshade --azimuth 270 --elevation 45 --exaggeration 10 --color-table template.kwl --srs EPSG:4326 input.src output.jpg
Example with color table without dot.src file:
ossim-chipper --op color-relief --azimuth 270 --elevation 45 --exaggeration 1.5 --color-table color-relief-lut.kwl --srs EPSG:4326 n37.dt1 t1.tif
Chipping examples in image space:
Chip about latitude longitude point, 512x512 in image space, rotate "up is up", histogram stretch, scale to eight bit, outputting to a png file.
Note the up is up mode requires a sensor model that is affected by elavtion.
ossim-chipper --op chip -u --histogram-op auto-minmax --cut-center-llwh -42.883986392005788 147.331309643650911 512 512 --scale-to-8-bit -w ossim_png 5V090205P0001912264B220000100282M_001508507.ntf up-is-up.png
Additional Parameters
ossim-chipper shares many of the parameters used in orthoigen including:
- writer-props
- resample-type
- thumbnail
- srs
It accepts a comma delimited list of input files or a .src file. The output file extension is used to determine output format. As with orthoigen, users can specify a writer to use with a -w argument.
SRC File
The src file used by ossim-chipper is nearly identical to the one used by orthoigen. The primary difference between the 2 is the use of the dem keyword to distinguish elevation data from imagery data. Example:
image0.file: C:\my_image.ntf image0.entry: 2 image0.ovr: D:\support_dir\images\my_image.ovr image0.rgb: 3,2,1 dem0:file E:\N38W123.hgt dem0.entry: 0 dem0.ovr: D:\support_dir\dems\N38W123.ovr dem1:file Z:\N37W123.hgt dem1.entry: 0 dem1.ovr: D:\support_dir\dems\N37W123.ovr
Pan Sharpened Multispectral (PSM):
Example command:
$ ossim-chipper --op psm -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.902358775406725 147.337399071900336 256 256 --resample-filter sinc --scale-to-8-bit -w ossim_png 5V090205M0001912264B220000100072M_001508507/Volume1/5V090205M0001912264B220000100072M_001508507.ntf 5V090205P0001912264B220000100282M_001508507/Volume1/5V090205P0001912264B220000100282M_001508507.ntf outputs/psm-output-1.png
NPP VIIRS ortho
Reprojected to thumbnail, max dimension 1024 to eight bit png:
ossim-chipper -w ossim_png -t 1024 -e 10 --op ortho --output-radiometry U8 GDNBO-SVDNB_npp_d20131210_t1840144_e1845548_b10987_c20131211154952933454_noaa_ops.h5 outputs/GDNBO-SVDNB_npp-ortho_test1.png
http://download.osgeo.org/ossim/thumbnails/GDNBO-SVDNB_npp-ortho_test1.png
NPP VIIRS raw thumbnail
Output raw thumbnail, max dimension 1024 to eight bit png:
ossim-chipper -w ossim_png -t 1024 -e 10 --op chip --output-radiometry U8 GDNBO-SVDNB_npp_d20131210_t1840144_e1845548_b10987_c20131211154952933454_noaa_ops.h5 outputs/GDNBO-SVDNB_npp-chip_test1.png
http://download.osgeo.org/ossim/thumbnails/GDNBO-SVDNB_npp-chip_test1.png
Last updated: 07 January 2014
Attachments (6)
- dem.jpg (100.1 KB ) - added by 11 years ago.
- up-is-up.png (177.8 KB ) - added by 11 years ago.
- ms-input-1.png (15.3 KB ) - added by 11 years ago.
- pan-input-1.png (40.2 KB ) - added by 11 years ago.
- ms-input-1.2.png (15.3 KB ) - added by 11 years ago.
- psm-output-1.png (112.0 KB ) - added by 11 years ago.
Download all attachments as: .zip