How To: Generate a point coverage using INFO item values
Instructions provided describe how to generate a point coverage using INFO item values. It is possible to use coordinate values stored in an INFO file to create a point coverage.
The following steps describe how to generate a point coverage using INFO item values by first using INFO to create a text file containing coordinates, and then using the Arc GENERATE command to create a point coverage.
Assume that there is an INFO file named XY.DAT that contains the items X-COORD and Y-COORD.
If one does not already exist, add an item to the INFO file that can be used as a unique identifier for each point:
Arc: additem xy.dat xy.dat id 4 5 b
Make sure the new item is large enough to hold the value of the number of points in the file. In other words, if there are 1000 records in the file, the new item must be wide enough to store the number 1000.
Specify an output file with the OUTPUT command. Using the OUTPUT command from the INFO prompt, it is possible to redirect the program's output to a specified text file.
For example, the following command sequence creates a file called 'output.txt' in the parent Arcinfo workspace of the current INFO directory:
ENTER COMMAND >OUTPUT ..\output.txt
A relative path must be given to place the file in the Arcinfo workspace, as opposed to the INFO directory. INFO defaults to the current directory.
It is also possible to specify a full path to any location on the system with the OUTPUT command.
Turn off commas in the display by changing the value of the $COMMA-SWITCH variable to -1.
The $COMMA-SWITCH variable determines whether INFO puts commas in a displayed numeric field (item types B, F, I, and N). Use the CALCULATE command to set this system item to one of the following values:
-1 directs INFO not to use commas in numeric fields.
0 directs INFO to use all necessary commas or no commas for numeric fields, depending on the internal and output widths for each field. If the output width is sufficiently wider than the internal width, to accommodate the longest possible entry, INFO inserts all necessary commas. If the output width is not sufficiently wider than the internal width, INFO does not insert any commas.
1 directs INFO to use commas in numeric fields. INFO places commas in the output field from right to left until the output field is filled.
This is necessary to prevent INFO from placing commas when displaying numeric values. The output file created is used with the GENERATE command, which reads commas as field delimiters.
SELECT the INFO file that contains the coordinate values:
Use the INFO PRINT command to display the ID and coordinate values, delimited by commas:
Placing commas in single quotes results in them being displayed literally in the output file. There is no output to the screen, as it has been redirected to the file.
Use the PRINT command to append the word 'END' to the file. This is a keyword for the GENERATE command.
Quit INFO, and use the Arc GENERATE command to create a point coverage:
Arc: generate pointcov
Copyright (C) 1982-2000 Environmental Systems Research Institute, Inc.
All rights reserved.
GENERATE Version 8.0.2 (Tue Feb 22 08:01:14 PST 2000)
Generate: input output.txt
Creating points with coordinates loaded from output.txt
Externalling BND and TIC...