Instructions for Running Interp (Linux version of P2G) on Raw Data Files




Yüklə 15.64 Kb.
tarix28.02.2016
ölçüsü15.64 Kb.
Instructions for Running Interp (Linux version of P2G) on Raw Data Files

written by Jennifer Dischler, with edits by Ramon Arrowsmith

14 July 2009, Arizona State University
This document contains instructions for modifying a raw data file, such as a .pf file, to work with the “interp” function in a shell script.
User-Defined Variables:
ORIGINAL_FILE.pf1: raw data file
1,417774.84,892380.40,1050.38

1,417790.81,892380.90,1050.84

1,417813.07,892383.06,1049.72

1,430387.48,892501.75,1051.40



1,430374.42,892501.64,1051.43

1,430361.43,892501.49,1051.24

END

NEW_FILE.pf1: newly modified file to run “interp” on
417774.84,892380.40,1050.38

417790.81,892380.90,1050.84

417813.07,892383.06,1049.72

430387.48,892501.75,1051.40



430374.42,892501.64,1051.43

430361.43,892501.49,1051.24


FILE_TO_GENERATE: output file name for interp generated file(s) (do not specify an extension, interp will do this for you)

How to Create .asc Files Using the “interp” Function
STEP 1: If the record (single row) has valid data (comma separated numbers), remove first column of record and redirect intoNEW_FILE.pf1:
awk -F"," '{OFS=","}{if ($2 != strnum && $3 != strnum && $4 != strnum) print $2,$3,$4 }' ORIGINAL_FILE.pf1 > NEW_FILE.pf1

STEP 2: Run interp on the new .pf file (see notes below for further interp function definitions). The radius and resolution contribute to the run time of interp, i.e. the smaller the radius and/or finer the resolution, the longer interp takes to run:
interp -i NEW_FILE.pf1 -o FILE_TO_GENERATE -r 1 --allarc --resolution 2
STEP 3: rename newly generated file(s) to have an .asc extension, in order for ArcGIS to recognize the file(s)

STEP 4: Open the .asc file(s) in ArcGIS to view output


NOTES ON “interp”:
./interp -i

-o

[-r ]

[--allarc] [--minarc] [--maxarc] [--meanarc] [--idwarc] [--denarc]

[--allgrid] [--mingrid] [--maxgrid] [--meangrid] [--idwgrid] [--dengrid]

[--resolution=]

[--maxsize=]

[--min_x= --max_x= --min_y= --max_y=]


1. -i :

- must be unzipped plain text file


2. -o :

- without extension, i.e. if you want the output file to be test.arc, this parameter shoud be "test"


3. -r

- specifies the search radius. The default value is min(1.0, sqrt{2} * {resolution} / 2)


4. Output Type:

--allarc: all the values are stored in ArcGIS format

--minarc: the Zmin values are stored in ArcGIS format

--maxarc: the Zmax values are stored in ArcGIS format

--meanarc: the Zmean values are stored in ArcGIS format

--idwarc: the Zidw values are stored in ArcGIS format

--denarc: the density values are stored in ArcGIS format
--allgrid: all the values are stored in Ascii Grid format

--mingrid: the Zmin values are stored in Ascii Grid format

--maxgrid: the Zmax values are stored in Ascii Grid format

--meangrid: the Zmean values are stored in Ascii Grid format

--idwgrid: the Zidw values are stored in Ascii Grid format

--dengrid: the density values are stored in Ascii Grid format


5. Resolution

- --resolution=: The resolution is set to the specified value. Use square grids.

- If not specified, default values (6ft) are used.
6. Limiting size

--maxsize: the maximum number of cells in one direction.

Suppose grid size is X x Y.

If either X or Y is larger than maxsize, it stops processing


7. Data information:

- if you know the min/max of the dataset being processed, provide them with the following options



--min_x= --max_x= --min_y= --max_y=

- This will reduce the execution time to about 80%


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azrefs.org 2016
rəhbərliyinə müraciət

    Ana səhifə