You can write a DOS command batch file and specify the .XML configuration file as part of command line options to batch-generate GeoPDF files from multiple source image files. The Publisher for Raster version 5.0.0 engine works with new .XML configuration files defined and saved through the Publisher for Raster user interface. If the .XML configuration file was created using a prior version of Publisher for Raster, the file generation process accepts the bands that represent the base RGB colors but does not accept any additional color bands.
Publisher for Raster uses the GDAL 1.8.0 translator library released by the Open Source Geospatial Foundation for raster geospatial data formats. Refer to GDAL's specifications for supported versions and limitations at http://www.gdal.org/.
In this section:
Generating GeoPDF files in a batch
From your computer's Start menu, navigate to All Programs > Accessories > Command Prompt.
Use the following syntax in the command prompt to batch-generate GepODF files from multiple source image files:
raster2pdf.exe c:\mydata\sample.img --config=c:\myfiles\myconfig.xml
or
raster2pdf c:\mydata\sample.img c:\myoutput\great.pdf --config=c:\myfiles\myconfig.xml
Specifying options
The two examples above allow options to be specified via the --config
command line option. These examples also specify the input (and optional output) file name(s). For more on the available options, see GeoPDF for Raster Command Prompt Usage.
If the same option is specified via the command line and in the .XML configuration file, the command line specification takes precedence to ensure successful backwards-compatibility.
Scripting batch file generation
You can write a DOS batch script that processes all files in a folder with the same file generation parameters. For example, the sample script below would process all of the .IMG files in the c:\myfiles
folder with the myconfig.xml configuration file:
for %A in ('c:\myfiles\*.img') do raster2pdf.exe '%A' --config='c:\myfiles\myconfig.xml'
You can accomplish the same processing by specifying a specific .XML project file as a command line argument using the following format:
raster2pdf c:\myfiles\myproject1.xml
raster2pdf c:\myfiles\myproject2.xml
You can write a DOS batch script that processes several images, each with its own .XML project file. For example, the sample script below would process all of the .XML project files in the c:\myfiles
folder:
for %A in ('c:\myfiles\*.xml') do raster2pdf.exe '%A'
Batch-generating GeoPDF files from ADRG files
You can use Publisher for Raster via the Command Prompt to batch-generate GeoPDF files from georeferenced or orthorectified image ADRG files simply by providing the name of the ADRG .GEN file <in_file_name>
for the datasets.
You have the option to provide the location of the output files [out_path_name]
. If you do not provide the path for the output files, the file generation process places them in the directory with the .GEN files.
Command prompt syntax
From your computer's Start menu, navigate to All Programs > Accessories > Command Prompt. You can also access the Command Prompt via the Run dialog box. From the Start menu, click Run. In the Open box, type cmd
and then click OK.
Use the following syntax in the command prompt to batch-generate GeoPDF files from ADRG files:
raster2pdf.exe <in_file_name> [out_path_name] [options]
Specifying options
Use the following syntax to specify an option:
raster2pdf.exe C:\ADRG_Files\TGQO01.GEN C:\ADRG_Files\output\ --combined
For more on specifying options, see GeoPDF for Raster Command Prompt Usage.
Batch-generating GeoPDF files from other files
You can use Publisher for Raster via the Command Prompt to batch-generate GeoPDF files from georeferenced or orthorectified image CADRG, CIB, IMG, JP2, MrSID, NITF, and TIFF files simply by providing the path to the directory that contains the specific <input>
for the datasets.
You have the option to provide the location of the output files [output]
. If you do not provide the path for the output files they are placed in the directory with the input data.
Providing the input path
If you are batch-generating GeoPDFs from CADRG or CIB files, the <input>
should be the path to the directory that contains the TOC files for the datasets.
If you are batch generating GeoPDFs from IMG, JP2, MrSID, NITF, or TIFF files, the <input>
should be the path to the directory that contains the image files for the datasets. For instance, if you are batch-generating GeoPDFs from IMG files, <input>
will be the path to the directory that contains the IMG files for the datasets, and if you are batch-generating GeoPDFs from TIFF files, <input>
will be the path to the directory that contains the TIFF files for the datasets.
Command prompt syntax
From your computer's Start menu, navigate to All Programs > Accessories > Command Prompt. You can also access the Command Prompt via the Run dialog box. From the Start menu, click Run. In the Open box, type cmd
and then click OK.
Use the following syntax in the command prompt to batch-generate GeoPDF files from your files:
raster2pdf.exe <input> [output] [options]
Note: Samples larger than 8 bits are scaled to 8 bits.
Syntax examples
See GeoPDF for Raster Command Prompt Usage for details on command prompt syntax for specifying options.
Image file type |
Example type |
Syntax example |
---|---|---|
CADRG |
Option |
|
CIB |
Option |
|
IMG |
Multi-band XML configuration file |
|
JP2 |
Output |
|
MrSID |
Output |
|
NITF |
Output |
|
TIFF |
Output |
|
Batch-generating GeoPDF files from CADRG files
-
Only image subdatasets are supported. Multiple image subdatasets can be generated.
-
The alpha band is unsupported.
Comments
0 comments
Please sign in to leave a comment.