Adobe Tagged Image File Format (TIFF or TIF, same thing) is so universally used as a format for imagery that few people know it is a Adobe format. TIF files can contain tags, additional items of information, that can be used to extend the standard for different purposes. Software that does not understand how to use extra tags simply ignores them. Manifold can read and write TIF files. TIF is a very popular export format for interchanging images. Manifold also reads BigTIFF, an extension of TIFF format to handle TIF images that are larger than 4 GB.
A GeoTIFF is a TIF file that ends in a three letter .tif extension just like other TIF files, but a GeoTIFF contains additional tags that provide projection information for that image as specified by the GeoTIFF standard. When Manifold reads a TIF that contains GeoTIFF tags, the system will automatically capture that projection information to assign to the image. When Manifold exports an image to TIF format, Manifold always writes GeoTIFF tags into that file to specify the projection that image used within the Manifold project. TIFs created by Manifold therefore are always GeoTIFF compliant TIF files. When Manifold exports a TIFF bigger than 4 GB, it is automatically exported as a BigTIFF. When exporting, a .mapmeta file is written. See the Exporting topic.
To import from TIF format:
Choose File-Import from the main menu.
In the Import dialog browse to the location of the file and double-click on the .tif or .tiff file desired.
A table and an image will be created.
Importing the sample file shown in the dialog above results in an image and its table:
We can double-click the image to open it. For a more interesting display, we first create a new data source using a Google street maps image server as shown in the Example: An Imageserver Tutorial topic, we create a map and drag and drop the Google layer into the map. We then drag and drop the image into the map.
In the illustration above we have also created a second data source using a Google image server that provides streets and labels with transparent pixels between, and we have dragged and dropped that layer into the map above the image layer. That provides a network of streets and labels overlaid on the image to provide some context.
We can see the image shows an aerial view of Washington, DC, in the United States. The image is a false color rendition synthesized from image channels acquired in infra-red frequencies by a satellite.
There are many different types of TIF files. Manifold will automatically adapt to the different type of TIF being imported. Some of the TIF types Manifold understands:
.tif images that do not have embedded georegistration information.
.tif images written in GeoTIFF standard. This standard embeds projection information using tags within the tif file.
.tif images that are accompanied by a tfw "world" file to (hopefully) provide georegistration information.
.tif images encoded using 11-bit data.
.tif images encoded using 16-bit data.
.tif files containing 16-bit integer LAB data.
.tif files containing 16-bit integer and 32-bit / 64-bit floating point CMYK data.
.tif files containing complex (that is, real + imaginary) number values.
.tif images that contain EXIF tags.
.tif images larger than 4 GB using BigTIFF format.
Manifold's TIF dataport will scan the contents of the .tif file and automatically select the correct import mechanism. Surfaces imported from .tif files with floating-point values will automatically set pixels with invalid or infinite floating-point values to be invisible.
Reading a TIFF interprets 3-channel floating-point images as RGB images and 4-channel floating-point images as RGBA images.
Ordinary .tif or .tiff files are simple graphics files that have no projection (coordinate system) or georegistration information. They import as ordinary images.
TIF or TIFF format files can occur in a specialized form called GeoTIFF files that save projection information along with the image. GeoTIFF files embed information about the projection within tags in the .tif or .tiff format file. Images saved using GeoTIFF require only one file with a .tiff or .tif file extension. True GeoTIFF files will import automatically with correct georegistration.
GeoTIFF tags are different than the older approach of using TFW "world" files together with TIF files, where a separate .tfw file provides coordinate system information to be used with the similarly-named .tif file it accompanies. Adding to the confusion is that some packages will create both a GeoTIFF file as well as a .tfw "world" file. The .tfw file provided in such cases is not part of the GeoTIFF standard. TFW "world" files frequently do not provide sufficient information to allow georegistration, which is one reason why GeoTIFF is used by modern packages.
Manifold looks first for GeoTIFF tags within the image. If these are found the image is imported using GeoTIFF standards. If GeoTIFF tags are not found Manifold checks for a .tfw file and does its best to import using whatever information may be found in that file. If neither GeoTIFF tags nor a .tfw file nor any other accessory files are found Manifold will import the .tif as an ordinary graphics file without any georegistration.
For accessory files Manifold will read to try to find projection information, see the Projections from Accessory Files section of the Projections topic.
Exports: Manifold always writes TIF / TIFF files as GeoTIFF, writing data for the coordinate system in use into the file. Such tags are ignored by software that does not understand GeoTIFF but are highly useful for software that is GeoTIFF aware.
Exporting an image to TIFF writes values for invisible pixels as legal values set to the reserved void value specific to the pixel type, and advertises the used void value for other applications. Visible pixels with values equal to the reserved void value are adjusted so they do not coincide with the reserved void value. This may lose some data, but better the pixel is adjusted slightly than an invisible pixel is made visible or vice versa.
Void values for signed integer types are chosen to be the minimum allowed value. In the -128 to127 range for pixel values, -128 is the void value. A pixel with a valid value of -128, that is, not intended to be a void value pixel, will be adjusted to -127 on export. Void values for unsigned integer types are chosen to be the maximum allowed value. Void values for floating-point types are chosen to be the maximum allowed value.
Exporting an image to TIFF that has had channels remapped using the Style pane will produce a TIFF with remapped channels, ensuring the exported image looks the same as the original.
We import the example Ginevra image. The Style panel shows that Channel 2 is used as the red channel, Channel 1 as the green channel, and Channel 0 as the blue channel.
We change channel assignments in the Style panel so that Channel 0 is used as the red channel, Channel 1 remains in use as the green channel, and Channel 2 is used as the blue channel.
Next, with the focus on the image, we choose File - Export and export to TIF format, to a file called Ginevra_remapped.tiff.
Opening the Ginevra_remapped.tiff file in Microsoft Photos, we see it retains the otherworldly coloring resulting from swapping channels for red and blue.
Importing the Ginevra_remapped.tiff file into Manifold and opening the resultant image, we see that the Ginevra_remapped.tiff file has retained the assignments of Channel 0 to red and Channel 2 to blue.
An alpha channel is a channel that gives transparency to be used for an image. Many "RGB" images are really RGBa images, in that they have a fourth channel that specifies the transparency for each pixel. Images also often use a fourth channel to convey information for non-visible light frequencies, such as near-Infrared, as is discussed in the Example: Display an NAIP Four Band Image as Color Infrared (CIR) topic and the SQL Example: Create NDVI Displays topic.
The TIF standard specifies a tag that should declare whether a fourth channel is a data channel or an alpha channel. Manifold correctly reads and utilizes that tag: When the tag value says the fourth channel is an alpha channel, Manifold uses it as that to control transparency for pixels in the image and exposing the channel as an alpha channel in the Style dialog for the image. When the tag says the fourth channel is a data channel, Manifold correctly sets alpha for the image to be fully opaque and loads the channel in readiness for use as a possible data channel.
Unfortunately, many software packages which create TIF files either do not set that tag or set it incorrectly. Therefore, it is common to encounter TIF files with a fourth channel where Manifold must guess whether that fourth channel is intended as an alpha channel or as a data channel. In all such ambiguous cases, Manifold always interprets the channel as an alpha channel, since if that it is an error it is easier for the user to fix (simply choosing Value for the Alpha channel in the Style dialog) than fixing the error of failing to identify an alpha channel.
Opacity or Transparency? - Alpha channels may be interpreted as setting either opacity, or transparency. When an alpha channel sets opacity, a high value in the channel means greater opacity, with a value of 255 meaning completely opaque and a value of 0 meaning totally transparent. When an alpha channel sets transparency, a high value means more transparency. Some formats, such as TIF images, specify alpha as opacity, so that is how Manifold imports alpha channel data for TIF, interpreting 255 as full opacity. Other packages and formats use transparency for alpha, and sometimes alpha data in TIF is stored using transparency. The default setting for internal use by Manifold is to interpret alpha as transparency, as is shown above in this topic.
If alpha data is ever imported and is flipped from how it should be, using transparency instead of opacity or vice versa, and the reverse is required, that is easy to arrange using Manifold's automatic inversion capability, as discussed in the section titled Example: Automatic Inversion in the Style: Images topic.
Killing GeoTIFFs with Non-Spatial Image Editors - A GeoTIFF is just an ordinary TIF image with extra tags inserted into the image that specify projection information. That works great if the image editing software we use understands such extra tags. Manifold and certain other image processing packages in the GIS world understand those extra tags. Image editors such as some versions of PhotoShop, Gimp and many other non-GIS image editing packages will not preserve the extra tags. Opening a GeoTIFF with such non-GIS software will usually destroy the projection information it contains.
When a spatially unaware graphics editor loads a GeoTIFF it ignores the extra projection system tags and proceeds to display the TIF image just as if it was a plain, ordinary, dumb-format, non-GIS image. When the editor saves that TIF or updates it in any way those projection tags have already been lost and the result is that the image is now just a plain, ordinary, dumb-format, non-GIS TIF image. It is no longer a GeoTIFF.
It is therefore critically important to keep inexpert users away from GeoTIFF files to ensure they do not open them with a consumer image editing program that will ruin the GeoTIFF. Worse yet, it is almost a law of nature that the same sort of inexpert user who does such things will deny to the end of time that they ever touched any files.
The result is that we will end up with a collection of .tif files that once were GeoTIFFs but which we discover, unpredictably and at random, have been converted into ordinary TIF files that no longer contain projection information and are useless for GIS. The really annoying part of GeoTIFFs versus TIFs in that since they both end in the same .tif extension there is really nothing to distinguish the two except the presence of invisible projection tags inside the format that only GIS software like Manifold understands.
If we have had the bad luck of inadvertently losing a GeoTIFF by it being opened in a spatially unaware image editing package, the bad news is that those projection tags probably are gone forever. There is nothing about what remains in the .tif that will allow us to get them back.
If we have not yet used the image and there is no .MAPMETA or .XML accessory file for it, we will be stuck with either getting fresh copies of the GeoTIFFs from the original source, or painfully trying to find out from that original source exactly what the projections were and manually specifying them for each such image by manually launching Assign Initial Coordinate System in the Component pane.
Restoring GeoTIFFs - If we have a GeoTIFF that was opened in an image editor and killed by an inexpert user, there is a chance to save that GeoTIFF if it has ever been saved by Release 8, Radian Studio or Manifold System.
When writing a TIF that is a GeoTIFF, Release 8 creates an auxiliary XML file that stores the projection information for that TIF. When writing a TIF that is a GeoTIFF both Radian Studio and Manifold will create a .MAPMETA accessory file that saves the projection information for the TIF. If we have either a Release 8 XML or a .MAPMETA file for the former GeoTIFF, we can restore it.
Place the GeoTIFF and its accompanying XML or .MAPMETA file in the same folder so that when we open the former GeoTIFF the projection information will be restored to the image. Export the GeoTIFF again and the projection information will be re-embedded into what will again be a GeoTIFF. The inclination of inexpert users to kill GeoTIFFs was one of the main reasons Manifold introduced an auxiliary XML file to save projection information, just in case, and why the safety net of a .MAPMETA file continues into Radian technology products.
Mask images - Reading TIF reads mask images.
Z data - Reading TIF reads Z offset / scale / unit data, if available.
Exporting and intermediate levels - To save space, exporting a big image to TIF skips producing data for intermediate level 1, and instead produces intermediate levels starting from level 2.
GDAL Metadata - Reading TIF recognizes GDAL metadata, saving the metadata into a comments component with UNIX line ends converted to Windows.
Example: Spectacular Images and Data from Web Servers
Example: An Imageserver Tutorial
Example: Display an NAIP Four Band Image as Color Infrared (CIR) - How to use the Style pane for images to re-assign channels in a four band NAIP image to produce a Color Infrared (CIR) image display.
SQL Example: Create NDVI Displays - How to create a query that creates an NDVI display from a four-band NAIP image, with tips and tricks on how to copy and paste existing information to get the result we want.