RASCAT(1NCARG)
π RASCAT π β like, the NCAR Graphics manual page, but make it make sense
okay so bestie, welcome to RASCAT, from the NCAR GRAPHICS corner of the universe. it's a 1NCARG manual page, it's giving glow-up for your raster files, and yes i'm gonna walk you through every single flag because you deserve the full tea. π«Ά
β¨ NAME β¨
Rascat β concatenate, convert raster files. that's it. that's the whole job. it glues raster files together and makes them match. π
π SYNOPSIS π
rascat [ -help ] [ -ifmt format ] [ -ira algorithm ] [ -ofmt format ] [
-output file ] [ -resolution resolution ] [ -rgbscale scale-factor ] [
-scale scale-factor ] [ -verbose ] [ -Version ] [ -window nx ny x y ] [
-pal palette_file ] [ -|file... ]
π¦ DESCRIPTION π¦
so here's the vibe: rascat reads each file in sequence and copies its contents to the standard output, doing whatever format conversion and data massaging is necessary, exactly as you specified on the command line. no cap. β¨
by default, rascat figures out the format of a file by looking at the file name extension. and if you feed it multiple files with varying formats, it will perform format conversion so that the resulting concatenated file ends up in the format of the first file processed. first one sets the tone, everyone else falls in line. main character energy fr. π
now, the rules β and bestie, these are non-negotiable:
- input files must all have the same spatial resolution and the same depth.
- 8-bit and 24-bit files may not be intermixed. not even a little.
- and if an input file contains multiple images, every image in that file must have the same spatial resolution and be the same depth.
currently, only 8-bit-indexed and 24-bit-direct color encodings are supported.
for a list of supported image formats, go peek at ras_formats(5NCARG). π
π OPTIONS π
okay this is the part you actually came for. every single one, no skipping. π
-helpβ print a usage message and exit. short, sweet, helpful. π«Ά-ifmtformat β specify the input file format. format is one of the file name extensions discussed inras_formats(5NCARG)(without the".", e.g.xwd). when this option is specified, file name extensions are not necessary and are ignored if present. and heads up: all input files must have the same format.-iraalgorithm β specify the image resampling algorithm to be used when either the-scaleor the-resolutioncommand line option is used. algorithm may be eitherNN, indicating a "nearest neighbor" algorithm, orBL, indicating a "bilinear interplation" algorithm. the default is to do "nearest neighbor" interpolation. π§-ofmtformat β specify the output file format. format is one of the aforementioned file name extensions. if used in conjunction with the-outputoption, the output file name requires no name extension and is ignored if present. slay. β¨-outputfile β specify an ouput file name and possibly an implicit output format. by defaultrascatwrites to the standard output. when this option is used, output is written to file. if the-ofmtoption is not specified, file must have a file name extension recognized byrascatβ in which case the file name extension will determine the output format.-resolutionresolution β resample the spatial resolution of input imagery to resolution, where resolution is the number of pixels in the x direction, followed by anx, followed by the number of pixels in the y direction, with no intervening spaces. for example,512x512specifies a 512 by 512 pixel resolution.
β οΈ Warning: aspect ratios are not preserved by this option. if the resolution of your input imagery has a different aspect ratio than that specified by resolution, the resultant image will be distorted. i'm not being dramatic, that's just what it says. π
-rgbscalescale-factor β specify a floating point scaling factor, scale-factor, to be applied to all the color intensities contained in the input files. this option may be fairly computationally expensive with 24-bit-direct encoded imagery. your CPU will be working overtime, ngl. π-scalescale-factor β specify a uniform, floating-point scaling factor to be applied to the spatial resolution of the input files. unlike the-resolutionoption, this one guarantees to preserve the aspect ratio of your imagery. for example, setting scale-factor to0.5causes your imagery to be resampled to one fourth of its original spatial resolution. if its original resolution was1024x1024, the resultant resolution would be512x512. math ate that. π₯-verboseβ tellsrascatto operate in verbose mode. it's a yapper now. π£οΈ-Versionβ printrascat's version number and then exit. π-windownx ny x y β specify a subregion of the input imagery to be extracted. the area outside the rectangular subregion defined by nx, ny, x and y is discarded. x and y specify the position of the upper-left corner of the rectangle. nx and ny specify the rectangle's width and height, respectively. crop era. βοΈ-palpalette_file β set the palette for the output rasterfile from palettefile, which can be either an HDF-type palette with an extension of".pal", or a textual palette with an extension of".txt". seeras_palette(5NCARG)for documentation on the formats. this option applies to indexed-color imagery only.
πΈ ENVIRONMENT πΈ
NCARG_TMPβ if set, this environment variable contains a directory path to be used for temporary files. on most systems the default is/tmp. on some systems the default is/usr/tmp. it's giving... wherever your system feels like it bestie. π
β EXAMPLES β
in the following example, a NRIF file, a Sun raster image file, and a XWD file are concatenated and converted into a single NRIF file:
% rascat file1.nrif file2.sun file3.xwd > file123.nrif
in this example the same files are converted and concatenated into a sun file:
% rascat -ofmt sun file1.nrif file2.sun file3.xwd > file123.sun
the -ofmt option is necessary in this example because the first file rascat encounters is an NRIF file. (first one decides the format, remember? main character energy β¨)
finally, in this example the upper left 512 by 512 rectangle of the file foo.sun is extracted and written to the file foo.512x512.sun:
% rascat -window 512 512 0 0 foo.sun > foo.512x512.sun
π SEE ALSO π
rasgetpal(1NCARG), rasls(1NCARG), rassplit(1NCARG), rasview(1NCARG), ras_formats(5NCARG), ras_palette(5NCARG)
Hardcopy: NCAR Graphics Fundamentals, UNIX Version
π CAVEATS π
read these. i mean it. π«Ά
- aspect ratios are not preserved by the
-resolutionoption. - not all formats support both 8-bit and 24-bit encodings.
- indexed and direct color encodings cannot be mixed.
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
the use of this Software is governed by a License Agreement.
and that's the whole page, bestie!! β¨ππ this lil masterpiece lives in the NCARG manual, dated January 1993, and the page itself is RASCAT(1NCARG). go forth and concatenate. ππ¦π
π¦ where this page comes from
- epel 9: ncl-common 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-common 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-common 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms