This article demonstrates the available options for transparency settings for your input map file. You can find a way, how to correctly get rid of white borders in the final map, or hide black background around the map.
Important notice
The transparency feature is available only for raster input images, not for vector input files.
Transparency of input file
What is transparency?
Transparency is the functionality that supports transparent areas in an image. If you put any background color under your image, transparent areas will have this background color. This is heavily used in maps, as you can show your image with transparent areas (eg. ragged edges for countries) over base map.
Opacity is the extent to which something blocks light. It is used to determine how a pixel is rendered when blended with another. The value range is between 0.0 - 1.0 or 0% - 100%; encoded values into Byte range 0 - 255. The value 0.0 (0%, 0) means full transparency - the color pixel will be invisible over base map (or background color), and the value 1.0 (100 %, 255) means full opaque - the final pixel after blending is defined only by this pixel color (defined in RGB channels).
Alpha band
Image colors consist of three bands (channels) - Red, Green, Blue. There is another band, the alpha band, which defines the level of opacity for each pixel (Byte range 0 - 255). If your image has defined an alpha band, MapTiler Desktop will use it for the export to a map.
MapTiler desktop allows ignoring the 4th band as the alpha band, the Transparency option is called Ignore alpha band. This is a common option for 4-bands raster images, where the 4th band is an infra-red channel (eg used for analytics).
Select a color
Instead of using the alpha band as a pixel-map for transparency, it is possible to select a specific color, which will be turned into transparency pixels. The very common usage is for white or black borders. The selected color from a system color palette form will be saved and displayed as NODATA #rrggbb
, hexadecimal representation for the color. The keyword NODATA means that specific color pixels are not useful data (NO-DATA). This keyword is used for MapTiler Engine argument.
Clip cutline
Satellite or aerial images could be missing an alpha band and borders NODATA pixels do not consist of a single-pixel color (black color #000000). MapTiler Desktop offers using a vector geometry (clip cutline) to remove NODATA pixels from the final map.
The clip cutline can be loaded from a vector file (eg. country shapefile from Natural Earth Data) or the cutline can be drawn using an internal tool inside MapTiler Desktop.
Conclusion
We have learned what is transparency and possible ways how to define and use it with raster images in MapTiler Desktop.
Comments
0 comments
Please sign in to leave a comment.