GeoProcessor / Best Practices / Command Files
Best practices for command files are:
- Document command files with sufficient comments.
- Consider using version control, such as Git/GitHub, to track changes to command files.
- Organize data files logically, for example, put data into a
data
folder. - Organize process files logically, for example, if multiple command files are used, consider creating multiple folders, with numbers to cause the folders to sort in sequential order.
- Use relative paths for file references, for example
data/somefile
and../data/somefile
. The command file folder will be set as the working folder (working directory) when the command file is read. All other file locations should be specified relative to that folder. This allows the files to be shared with others without having to change file paths. - Name GeoProcessor command files with
.gp
file extension. - Use the
StartLog
command to troubleshoot. This creates a local log file that is managed with command file and related files. The command can be commented out if it significantly slows down processing or creates a large log file. The name of the log file should be the same as the command file, with.log
appended (or a similar convention).