Take me to pcigeomatics.com

PCI Geomatics Help Center

How can we help you today?

ASTER_IN

PCI Geomatics -

doc FILE_IN_ASTERF imports all files (of one type) in a user specified
doc directory
doc as .PIX files, and places them into a user specified directory.
doc
doc 1 Details
doc
doc The FILE_IN_ASTER task is intended to make it easy to batch import a
doc directory
doc of ASTER files (IN_DIR). All files of a user specified type (TYPE) are
doc imported
doc to a user specified directory (OUT_DIR) in a .PIX format.
doc
doc
doc
doc
doc
doc This script uses the pace program CDASTER
doc
doc 1 Parameters
doc
doc FILE_IN_ASTER is controlled by the following parameters:
doc
doc IN_DIR Input file directory
doc OUT_DIR Output file Directory
doc TYPE File extension of use on import
doc
doc
doc
doc
doc
doc 1 Example
doc
doc In this example all files with a tif extension are imported from a
doc user specified directory and are placed in a separate directory
doc
doc EASI>r file_in_aster
doc
doc
doc Please enter the directory which contains the files to be imported:
doc >C:\aster
doc
doc Please enter the directory in which to place the imported files:
doc >C:\aster
doc
doc Please enter the 3 letter file extension of the files you wish to
doc import:
doc >hdf
doc
doc
doc 2 IN_DIR
doc Specifies the directory of files to import
doc C:\xxxx\xxxx
doc
doc 2 OUT_DIR
doc Specifies the output directory to place the imported files
doc C:\xxxx\xxxx
doc
doc 2 TYPE
doc Specifies the 3 letter filetype extension to locate in the
doc specified directory:
doc hdf
doc


status_title "FILE_IN_ASTER"
status_end

local string in_dir
local string out_dir
local integer tfid
local string type
local mstring dirlist
local integer i
local string ext
local string fn
local string bn
local $Z
let $Z = "\

print @reverse,"FILE_IN_ASTER.EAS",@alloff
print ""

print "Please enter the directory which contains the files to be imported:"
input ">" in_dir

print "Please enter the directory in which to place the imported files:"
input ">" out_dir

print "Please enter the 3 letter file extension of the files you wish to import: "
input ">" type

dirlist = getdirectory(in_dir)

for i = 1 to f$len(dirlist)
fn = in_dir + $Z + dirlist[i]
ext = getfileextension(fn)
bn = getfilebasename(fn)

if (ext ~= type) then
filehd=in_dir + $Z + dirlist[i]
cdic=1,2,31
file=out_dir + $Z + bn +"VNIR"
run cdaster

filehd=in_dir + $Z + dirlist[i]
cdic=32
file=out_dir + $Z + bn + "VNIR3b.pix"
run cdaster

filehd=in_dir + $Z + dirlist[i]
cdic=4,5,6,7,8,9
file=out_dir + $Z + bn + "SWIR4_9.pix"
run cdaster

filehd=in_dir + $Z + dirlist[i]
cdic=10,11,12,13,14
file=out_dir + $Z + bn + "TIR10_14.pix"
run cdaster

endif
endfor

print "Files Imported/Exported Successfully !!"

return

Have more questions? Submit a request

Comments

Powered by Zendesk