Batch Mode
Scree Painter can run in batch mode when started from a console window or another process. This is useful for automating the generation of scree for a series of map sheets. The Java JAR file of Scree Painter 1.2 or higher and Java 1.8 or higher are needed.
To launch Scree Painter from the terminal, navigate to the directory that contains the ScreePainter.jar file, and type
java -jar ScreePainter.jar -h
This will display a list of required and optional command line arguments.
Note: If no command line arguments (such as -h) are specified Scree Painter will start with the normal user interface and not in batch mode. Only start Scree Painter with the terminal if you want to run it in batch mode. It is not recommended to start Scree Painter with the terminal if you want to use the graphical user interface.
If there is problem with the input data or if Scree Painter encounters any other problem, it displays an error message in the console and terminates. Progress information when importing data or generating scree is also displayed in the console. It is therefore important to start Scree Painter with the java.exe program and not the javaw.exe program (on Windows), because Scree Painter cannot display error messages or progress information when started with javaw.exe.
Below is an example of full command line string to start Scree Painter from the console on OS X. Note that the file paths will follow different conventions when starting Scree Painter on other operating systems. Use the conventions of the file exported with File > Export Command Line Arguments. Note that java -jar ScreePainter.jar has been added at the beginning of the file. The example below used the test data set.
java -jar ScreePainter.jar --parameters "/Users/jennyb/Desktop/extreme.txt" --shading "/Users/test/sampledata/shaded relief.tif" --dem "/Users/test/sampledata/dem.asc" --scree_polygons "/Users/test/sampledata/scree.shp" --obstacles_mask "/Users/test/sampledata/obstacles mask.tif" --large_stones_mask "/Users/test/sampledata/large stones mask.tif" --gradation_mask "/Users/test/sampledata/gradation mask.tif" --gully_lines "/Users/test/sampledatalines.shp" --reference_image "/Users/test/sampledata/reference.tif" --output_file "/Users/jennyb/Desktop/sample.pdf" --output_format "Geospatial PDF (Swiss CH1903+ / LV95)" --west 721000.0 --south 187000.0 --width 2000.0 --height 2000.0 --scale 25000.0
Note that there is no need to specify the memory allocated to Scree Painter with the Java -Xmx command line argument. When Scree Painter starts in batch mode, it immediately starts a second Java Virtual Machine that adjusts the allocated memory to the maximum available amount of memory. Therefore, it is recommended that Scree Painter be started without the -Xmx argument. If you encounter memory-related issues, it is recommended to close all other running applications before starting Scree Painter to maximize the available memory.
To launch Scree Painter from the terminal, navigate to the directory that contains the ScreePainter.jar file, and type
java -jar ScreePainter.jar -h
This will display a list of required and optional command line arguments.
Note: If no command line arguments (such as -h) are specified Scree Painter will start with the normal user interface and not in batch mode. Only start Scree Painter with the terminal if you want to run it in batch mode. It is not recommended to start Scree Painter with the terminal if you want to use the graphical user interface.
Command line arguments
The command line arguments specify file paths for input data, the extent and scale of the map, the output file format, and the output file path. Scree Painter follows the GNU/Unix convention for command line arguments. Arguments can be entered in any order, with the exception that the first argument must be -jar, and the second argument must be ScreePainter.jar. Use -- to separate arguments, and use quotation marks for arguments with empty spaces. Avoid non-ASCII characters. Return or newline characters must not separate arguments.Required command line arguments
- parameters: A path to a file with parameters for the generation of scree. Such a file can be created with the Save Settings command in the File menu. The file must in Scree Painter format 1.1 or higher.
- shading: A path to georeferenced shaded relief image.
- dem: A path to an elevation model in Esri ASCII grid file format.
- scree_polygons: A path to an Esri shapefile with scree polygons.
- obstacles_mask: A path to a georeferenced image file that serves as obstacles mask.
- output_file: The path to the output file path.
- output_format: The output file format. Possible values are "Geospatial PDF (Swiss CH1903+ / LV95)", Illustrator, PDF, Shape, SVG, TerraGoGeoPDF.
- west: The western border of the map sheet in ground coordinates.
- south: The southern border of the map sheet in ground coordinates.
- width: The width of the map sheet in ground coordinates.
- height: The height of the map sheet in ground coordinates.
- scale: The scale of the map (such as 50000 for 1:50,000).
Optional command line arguments
- large_stones_mask: A path to a georeferenced image file that serves as mask for large stones. Optional.
- gradation_mask: A path to a georeferenced image file that serves as a mask for adjusing the gradation. Optional.
- gully_lines: A path to an Esri shapefile with gully lines file path. Optional.
- reference_image: A path to a georeferenced image file that serves as reference image. Optional.
Preparation of command line arguments
Scree Painter 1.2 and higher can export a file with command line arguments for the currently loaded data. Start Scree Painter with the graphical user interface by double-clicking it. Then select File > Export Command Line Arguments. This file can be used to customize the command line arguments. Two file paths that are marked with *** in the exported file must be adjusted. Additionally, all return characters must be replaced with an empty space character.If there is problem with the input data or if Scree Painter encounters any other problem, it displays an error message in the console and terminates. Progress information when importing data or generating scree is also displayed in the console. It is therefore important to start Scree Painter with the java.exe program and not the javaw.exe program (on Windows), because Scree Painter cannot display error messages or progress information when started with javaw.exe.
Below is an example of full command line string to start Scree Painter from the console on OS X. Note that the file paths will follow different conventions when starting Scree Painter on other operating systems. Use the conventions of the file exported with File > Export Command Line Arguments. Note that java -jar ScreePainter.jar has been added at the beginning of the file. The example below used the test data set.
java -jar ScreePainter.jar --parameters "/Users/jennyb/Desktop/extreme.txt" --shading "/Users/test/sampledata/shaded relief.tif" --dem "/Users/test/sampledata/dem.asc" --scree_polygons "/Users/test/sampledata/scree.shp" --obstacles_mask "/Users/test/sampledata/obstacles mask.tif" --large_stones_mask "/Users/test/sampledata/large stones mask.tif" --gradation_mask "/Users/test/sampledata/gradation mask.tif" --gully_lines "/Users/test/sampledatalines.shp" --reference_image "/Users/test/sampledata/reference.tif" --output_file "/Users/jennyb/Desktop/sample.pdf" --output_format "Geospatial PDF (Swiss CH1903+ / LV95)" --west 721000.0 --south 187000.0 --width 2000.0 --height 2000.0 --scale 25000.0
Note that there is no need to specify the memory allocated to Scree Painter with the Java -Xmx command line argument. When Scree Painter starts in batch mode, it immediately starts a second Java Virtual Machine that adjusts the allocated memory to the maximum available amount of memory. Therefore, it is recommended that Scree Painter be started without the -Xmx argument. If you encounter memory-related issues, it is recommended to close all other running applications before starting Scree Painter to maximize the available memory.