ProRaster Help – Raster Source Editor Dialog

On this page, you will find general help for the ProRaster product family including links to documentation, instructional videos, and training videos.
Previous Topic: Supported Raster Formats
Next Topic: The Color Table Editor
Back to: ProRaster Help
Back to: ProRaster
Go to: ProRaster Essential help page, ProRaster Premium help page, ProRaster Scientific help page.
The ProRaster User Guide is available for download as a PDF.

Using the Raster Source Editor dialog

In an algorithm, all rasters are stored in raster source resources, and those resources are referred to by name in the algorithm. In ProRaster you can take shortcuts to access rasters, but behind the scenes your rasters will still be in a raster source. Creating raster sources is easy and they will save you time in the future as you will always be able to come back to a specific raster in ProRaster without trying to remember where you have squirrelled it away on disk.

Saved raster source definitions are stored on your C: drive in a binary file. You can only edit this file using the Raster Source Editor dialog. In addition to saved raster sources that you have created, you may have temporary raster sources. These are created in two ways – firstly, when you browse for a raster in a component property page or when you create an algorithm for a raster, and secondly when you open an MRD algorithm file. When you open an MRD the raster source definitions it contains will be compared against your saved definitions. If no match can be found, then a temporary raster source is created. When you close the algorithm, it will be destroyed.

Defining a raster source

 The Raster Source Editor dialog shows you all the raster source definitions, by unique name, in the system (for the current algorithm). Temporary raster sources are shown above the dotted line and permanent (saved) rasters sources are below it. Select any raster source in the drop-list to edit or view it. 

Buttons are provided to add a new raster source, delete the selected raster source, copy the selected raster source and to delete all raster sources. No changes are made until you hit the “OK” button, so if you want to reverse your edits, just hit “Cancel”. 

When you add a new raster source, you must immediately give it a unique name. The dialog will indicate whether the name you have assigned is unique. You can then specify what raster, or rasters, will be used in the raster source. Note that rasters are remembered by file path and name – no copy of the rasters is made. 

A raster source will commonly contain a single raster. Less frequently, you may define raster sources that contain multiple raster files. When you connect a multi-file raster source to a layer, all the rasters will be rendered using the layer properties. In that sense, it is an alternative to creating a layer for every raster and is much more convenient. 

All rasters in a raster source must all share the same coordinate system and raster structure (meaning that if you pick Field 0, Band 3 – there is such a field and band in every raster, and it contains the same kind of data). It is likely that they will all have the same cell size. As you can connect a different raster source to every component in a layer, there may be a different number of rasters in each of the components. This is supported in three different scenarios – Many : One, One : Many, and Many : Many (see Understanding Algorithms). 

To add rasters to a raster source, you  need to add items to the “Path or File” list. You can drag-and-drop a raster file from Windows File Explorer onto the dialog. Alternatively, hit the “Add a new file” button to browse for a file (or multiple files). As you add new items to this list, you will see new rasters appear in the “Raster file list”. 

Instead of adding raster by full path and name, you can add all the rasters of a particular type in a folder by using a path with a wildcard. To do this, drop down the “Selected file extension” list and choose the raster extension type you want to select. Then hit “Add  a new folder” and browse to the folder you want to target. All the rasters of that type in the folder will be added to the raster file list. 

It is important to understand that the raster source definition only consists of the paths and files in the “Path or File” list. When you use an extension wildcard only one path string is written into the algorithm, even though it may result in rendering 500 geotiff files (for example). Also, the number of files that will be rendered depends on how many are there at the time – so the algorithm can change by adding and removing rasters from the target directory. 

You can delete items from the :Path or File” list or reorder items. When you do so, the raster file list will be updated to reflect your changes. The order that rasters appear in this list is important if the rasters overlap. Rasters are rendered in the order in which they appear in the raster file list using a “filling in the corners” algorithm (to borrow from Tolkien). The opposite of a “painters” algorithm, pixels that are rendered are not subsequently overprinted. Each raster in the list just fills in any gaps that have been left by the rasters that were rendered before it. It follows that you should order the rasters from highest resolution to lowest, or from highest quality to lowest quality.

Rasters in a ZIP archive

Using a raster source you can target rasters, in a restricted list of supported formats, that are in a ZIP archive file. Firstly, add the ZIP archive file to the “Path or File” list. There are three possibilities: 

  1. The ZIP file contains a single raster in the root folder. 

The raster engine may be able to open the ZIP file directly and read the raster. If so, you ought to be able to see a preview of the raster in the ZIP archive. 

  1. The ZIP file contains multiple rasters in the root folder. 

By default, the raster engine will only open the first file it discovers in the archive. You can direct it to open all rasters by manually editing the path. For example, if it contains Arc ASCII rasters then you can add “/*.asc” to the path. For example: C:/MyData/MyProject/*.asc. Hit the “Apply and save changes” button, which should turn to a green tick. 

The rasters in the ZIP archive should now be listed in the raster file list, and you ought to be able to preview them. 

  1. The ZIP file contains one or more rasters in sub-folders in the archive. 

The same trick will find rasters in sub-folders in the archive. For example, if it contains an Arc ASCII raster then you can add “/*.asc” to the path. For example: C:/MyData/MyProject/*.asc. Hit the “Apply and save changes” button, which should turn to a green tick. You should be able to see rasters, even if located in sub-folders in the archive.

 You can also target a specific raster in an archive by naming it in full. For example:

C:/ MyData/MyProject/

 This will load the srtm_35_01 Arc ASCII raster from the srtm_35_01sub-folder of the archive file.

 The editor dialog includes a preview map window. To see a preview, click on a raster in the raster file list. A default rendering of that raster will then be displayed. You can zoom and  pan about this preview in the normal way. To customise the field, band, and time range you can drop down the “Preview Settings” menu button for options.

Information Report

 You can obtain information about a raster by selecting it in the raster file list and then hitting the information report button. You can customise the detail in this report by dropping down the Info menu button and selecting the required detail level. When you hit the information button a Raster Processor dialog is opened, and the report is dumped into the messages section of the dialog. You can resize this dialog and copy and paste text out of it. 

The available detail levels are Brief, Standard, Detailed, and Complete. If you select Complete then you get statistical information for every band, which can make for a lengthy report.

Validate, Clean, and Prepare Operations

Before you can use a raster in ProRaster, or in any modern application, you need to do some preparation work. It is highly recommended that you ensure your raster has an overview pyramid cache and has high quality statistics stored and ready to be used. If it needs to, ProRaster will generate these caches on-the-fly when the raster is opened. However, that does not mean that it generates them appropriately. You can exercise control over the generation of these assets using the Validate, Clean, and Prepare operations. 

The Validate operation will examine each raster in the currently selected raster source and report whether it has the required overview and statistics cache files. When you hit the “Validate” button a Raster Processor dialog opens, and the operation is executed. If any information is missing, you will see warnings and error messages in the operation report. 

The Clean operation will delete any existing cache and ancillary files. Drop down the Cache menu button to control what files will be removed. By default, it removes data cache files which contain the overview pyramid and GHX files which contains statistics. When you hit the “Clean” button a Raster Processor dialog opens, and the operation is executed. Before any files are permanently deleted, it will prompt you for confirmation. 

The Prepare operation will generate overview pyramid cache files and compute statistics, as required. Drop down the Prepare menu button to control cache file generation. You can choose Speed (which is the default) or Quality. This setting will modify what kind of compression is used in the cache. For data, if you choose Quality, ProRaster will use lossless compression that is slower but results in a smaller file size. For imagery, choosing Quality will result in lossless compression, whereas choosing Speed may result in lossy compression. When you hit the “Prepare” button a Raster Processor dialog opens, and the operation is executed. 

For all these operations, you need to ensure that the rasters that are going to be processed are not open elsewhere. This includes in this instance of ProRaster, or any other instance of ProRaster you have running! If you have the raster displayed in an algorithm, then the processing operations may not be able to modify the files. Also ensure they are not open in other applications like MapInfo Pro or QGIS.

Advanced Driver Preferences

Hit the Advanced button to open the Driver Preferences dialog. This presents a wide range of options that you can override.

Driver Preferences are supplied to the raster engine whenever it opens a raster. They will be supplied when the engine opens any of the rasters in the raster source definition. The driver preferences may modify the way the engine opens the raster, or the way a driver in the engine opens a raster. This can result in profound changes. In some cases, those changes impact the content of the overview pyramid cache and statistics. Therefore, if you make changes to driver preferences, you will probably then want to run the Clean and Prepare operations to update those cache files.

For example, Landsat data files used to be supplied as geotiff files with cells outside the data scene given a value of zero. However, it was not a declared invalid cell value. With driver preferences you can specify that zero is the invalid cell value. If you do not, all those zero values infect the overview pyramid and get blended with actual data values, producing polluted data up the pyramid. Who would make such a mistake? – Take a look at every single Landsat scene on AWS.

The general structure of driver preferences is that each property has a default value, and if you want to change the value you indicate that you want to override the property and can then edit the value. Some properties target the engine, some apply to all drivers, and some target specific drivers. Some of the useful properties are listed below:

Engine, Driver ID: In general, you do not specify which driver will open a raster. The engine will figure it out. However, some rasters can be opened by a Native driver and by the GDAL driver. In some cases, this may result in a different treatment of the data. You can specify a driver ID here to force the engine to use that driver. For a list of all driver ID’s, see this web page. For example, to make GDAL load a raster, use the MI_GDAL_GENERIC code.

All Drivers, Set coordinate system: This provides another mechanism to set the coordinate system of a raster if the engine cannot determine it or incorrectly determines it. Enter the coordinate system as a MIF string, which you can find in the Projection Selector dialog.

All Drivers, Set cell validity from alpha: If the raster has an alpha band, use this band to set cell validity.

All Drivers, Set field type: Some drivers may not be able to properly determine the field type of a raster. Use this to set it manually.

Geotiff driver, Specify the null value: Set a specified cell value to null.

Image driver (JPEG, PNG), Treat Image Palette as Image: Load ImagePalette raster fields as Image field type.

Image driver (JPEG, PNG), Use overview cache files: Allow overview pyramid cache files to be generated and permanently stored for images. Normally a temporary cache file is used.