Download Operation - PCRaster
Transcript
asc2map The most simple conversion is a conversion ignoring the layout of your data on the asciifile (ordering of data by rows, row definitions or headers for instance). This simple conversion is performed default. All the characters on your asciifile will be interpreted as data. The operator scans the asciifile starting at the top line from left to right, than the second line from left to right etc. Each time a value is scanned it is assigned to a cell on PCRresult until PCRresult is totally filled with cell values. If the asciifile contains a larger number of values than the number of cells on PCRresult, the remaining values are simply ignored. The values are assigned to PCRresult starting with the top row on the map and ending with the bottom row. The first value which is filled in is the first value in the asciifile, the second value is the second value in the asciifile etc.. This conversion imposes almost no restriction on the layout of the asciifile: if your data are ordered in a number of rows and columns which corresponds with the number of rows and columns on PCRresult it will result in a correct conversion, but if they are not ordered this way (for instance they are on one line in the asciifile) a conversion is also possible. conversion from ARC/INFO ascii files In ARC/INFO, grid maps can be converted to an formatted ascii file using the ARC/INFO gridascii command. These output files from ARC/INFO are converted to the PCRaster map format with asc2map using the option -a without setting the options -s, -m, -h and -r. These latter options will be totally ignored if you set them in combination with -a. The output asciifile from ARC/INFO will contain a header. The number of rows and columns of the original ARC/INFO map given in the header must correspond with the number of rows and columns of PCRclone. The remaining location attributes in the header are ignored during conversion since they are taken from PCRclone (cell size and x,y coordinates). If the header contains a no_data_value, each value in the asciifile which corresponds with the no_data_value is assigned a missing value on PCRresult. If the header does not contain a no_data_value the value -9999 is recognized as a missing value. conversion from Genamap ascii files In Genamap, grid maps can be converted to an formatted asciifile using the Genamap audit command. These output files from Genamap are converted to the PCRaster map format with asc2map using the option -g. The number of rows and columns of the original Genamap map, given in the header of the output file from Genamap must correspond with the number of rows and columns of PCRclone. Assignment of missing values can be specified by the option -m. Do not use the options -s, -h and -r in addition to -g. If you do set them, they will be totally ignored. conversion from asciifiles with an exotic format Two options can be used to impose the command to take into account the layout of your asciifile. They can not be used in combination with the options -a and -g. -h asciilinesheader This is used if the asciifile contains a header with information which must be ignored during scanning. The option -h must be followed by linesheader which must be whole number larger than 0. This is the number of lines which will be skipped at the top of the asciifile. The asciifile is scanned starting at line linesheader. -r asciilinesbeforemaprow The option -r results in skipping of data in asciifile each time before asc2map starts with filling a new row on PCRresult. Rows on PCRresult are filled in as follows: First a number of lines on asciifile is skipped. The number of lines which is skipped is given by asciilinesbeforemaprow, it must be a whole value equal to or larger than 0. Then, the asciifile is scanned http://pcraster.geog.uu.nl/documentation/pcrman/r14841.htm (3 van 5) [3/2/2005 5:04:22 PM]