FIMPORT

Import foreign file


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


FIMPORT transfers the image and all auxiliary information from a source file to a newly created PCIDSK file. All GDB-supported file types can be imported.
Back to top

Parameters


fimport(fili, filo, dbiw, poption, dblayout)

Name Type Caption Length Value range
FILI* str Input file name 1 -    
FILO* str Output file name 1 -    
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
POPTION* str Pyramid options 3 - 32 OFF, NEAREST, AVERAGE, MODE
Default: AVERAGE
DBLAYOUT str Data Layout 0 -   PIXEL | BAND | FILE | TILED | TILEDN | TILED JPEG | TILED QUADTREE | TILED RLE

* Required parameter
Back to top

Parameter descriptions

FILI

The name of the GDB-supported file to import to PCIDSK format.

FILO

The name of the PCIDSK output file to create.

DBIW

The raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers. If no value is specifed for this parameter, the entire layer is processed by default.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

POPTION

The resampling method to use to compute the overview levels.

Acceptable values include:

To compute thematic image overviews, such as classification results, use MODE. With continuous-tone images, especially radar images, use AVERAGE. Building overviews by using AVERAGE or MODE can be significantly slower than with NEAREST. If you do not know the characteristics of an image, or if the speed is your primary consideration in preparing the image overviews, use the NEAREST option.

DBLAYOUT

The layout of the image data in the new PCIDSK file.

Supported values include:

The specified layout is based primarily on performance. Band interleaved stores the data together for one band and provides a better performance when bands are not all being accessed at all times. Pixel interleaved stores the data for all bands together at a particular pixel and may provide improved performance when all bands are used at once. File interleaved is similar to band interleaved, but the image-channel data is stored in external files (one file for each band).

Tiled files organize the image in several square sub-images; these may be much faster to access when only a sub-area is being extracted, as in file viewing. Tiling is also the only format that supports compression formats, with a default of no compression.

JPEG compression is a lossy compression and is typically suitable for continuous images, such as airphotos.

Quadtree compression is another lossy compression, and provides good compression when images contain large blocks of pixels with the same value.

Run Length Encoding (RLE) compression is lossless, but only provides good compression for images in which long sequences of pixels have the same value, which is typical in pseudocolored or thematic images.

Back to top

Details

FIMPORT imports all of the data contained in a GDB-supported file format into a newly created PCIDSK file. Georeferencing, lookup tables (LUT), pseudocolor tables (PCT), and vector data are also imported, in addition to image data.

When you run FIMPORT, it analyzes the input file, detects the type, creates a PCIDSK file, and then copies the image and auxiliary data to it.

With FIMPORT, you can only import files in formats that are supported by the GDB library. For a complete list of GDB-supported file types and their codes, see About Generic Database file formats.

If a file you import contains image channels, FIMPORT creaets overviews to accelerate image viewing. By default, the function applies nearest-neighbor resampling; however, you can change this by specifying another value for the the POPTION parameter. If necessary, you can prevent FIMPORT from creating overviews by specifing "OFF". turning off overview creation saves disk space, and files are imported more quickly. If necessary, you can later run the PYRAMID algorithm to add overviews to an existing file.

The value you specify for the DBLAYOUT parameter determines the image organization of the PCIDSK file being created.

FIMPORT is similar to the LINK algorithm; however, unlike LINK, FIMPORT works with all GDB-supported files. FIMPORT creates a duplicate copy of the image data, which LINK does not.

FIMPORT creates detail lines indicating the imagery size, number of channels, and any auxiliary information copied over.

Back to top

Example

You import a subwindow of a large radar image. The overview pyramid levels are built with block averaging rather than the default nearest-neighbor resampling to make the resulting overviews easier to interpret.

from pci.fimport import *


fili = r"$PCIHOME/demo/irvine.pix"
filo = r"band1.pix"
dbiw = []
poption = "AVERAGE"
dblayout = ""		#Defaults to "BAND"

fimport(fili, filo, dbiw, poption, dblayout)

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.