Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example |
Back to top |
Back to top |
resamp(fili, dbic, dbsl, sltype, filo, ftype, foptions, pxszout, resample)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
FILI* | str | Input file name | 1 - | |
DBIC | List[int] | Input raster channels | 0 - | |
DBSL | List[int] | Input segments | 0 - 48 | |
SLTYPE* | str | Segment list data types | 3 - | See Details Default: ALL |
FILO* | str | Output file name | 1 - | |
FTYPE | str | Format of output file | 0 - 4 | Default: PIX |
FOPTIONS | str | Options for output format | 0 - | |
PXSZOUT* | List[float] | Ground size of output pixel | 1 - 2 | |
RESAMPLE* | str | Resampling method | 3 - | NEAR | BILIN | CUBIC | AVERA | MODE | BITFRAC[=<frac_val>] Default: NEAR |
Back to top |
FILI
The name of the input GDB-format file to resample.
DBIC
The input channels to resample.
DBSL
The input segment or segments to write to the output file. Bitmap, Rational Function math model and Incidence Angle array segments are resampled. Other segment types, such as vectors, LUTs, and pseudocolor tables (PCT) are copied to the output file.
SLTYPE
The GDB-supported data types for any input segments specified.
Each segment of any of the following types (specified with a segment number for DBSL) is processed. Bitmap, Rational Function math model and Incidence Angle array segments are resampled. Other types of segment-held data are copied to the output file. If you do not specify a value for DBSL, ALL is applied for SLTYPE.
DBSL = 1,3,5 SLTYPE = VEC, LUT
FILO
The name of the output file to which to write the resampled data.
FTYPE
The format of the output file.
The default value is PIX.
FOPTIONS
The options specific to the format to apply when creating the output file. With each, the default of no options is allowed (empty string).
Typically, the available options for a format include a compression scheme, format subtype, or other information.
PXSZOUT
The output resolution of one pixel in the X and Y (easting and northing) dimensions.
When you specify only one value, it applies to both resolutions in the X and Y (easting and northing) dimensions.
The size units for the PXSZOUT values are those of the input projection. If the input projection is Long/Lat, you must specify the the pixel-size coordinates in decimal degrees. With nonprojection georeferencing, such as meter or feet, the pixel size is expressed in these units.
For example, to resample a meter-based UTM projection to a pixel resolution of 30 by 30 meters, enter 30,30.
RESAMPLE
The resampling method to use to determine the output pixel values.
Back to top |
RESAMP changes the resolution of all raster input (imagery and bitmaps). Rational Function math model and Incidence Angle array segments are also resampled, while other segment types are simply transferred from the input file to the output file.
Note: Rational Function math model resampling is only supported for SAR datasets which have appropiate metadata.
Resampling downward decreases the resolution; resampling upward increases the resolution.
You can run RESAMP to convert multiple data sets of various resolutions to a resolution you specify. For example, when using the overlay functionality, all the data sets must be resampled to a common resolution value.
RESAMP will copy any file-level and channel-level metadata to the output file.
BITFRAC is a downsampling method for bitmaps and cannot be used when processing raster channels.
A value between 0 and 1 can be specified to define minimal fractional part of pixels set in original resolution before output pixel can be set as well. For example, resample="BITFRAC=0.75" means that a pixel in the output bitmap will be set to one (1) only if at least three-quarters of its area is covered by set (1-valued) pixels in the input bitmap. If nothing is specified then default value of 0.5 is used. 0 is a special value which means that just one input pixel is enough for the output value to be set. 1 means all input pixels must be set for the output pixel to be set as well.
Back to top |
from pci.resamp import * fili = "irvine.pix" dbic = [1,2,3] dbsl = [25,26] sltype = "ALL" filo = "test.pix" ftype = "PIX" foptions = ' ' pxszout = [1.2, 1.2] # output with a 1.2 meter resolution resample = "CUBIC" # Cubic-convolution method resamp( fili, dbic, dbsl, sltype, filo, ftype, foptions, pxszout, resample )
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.