The following clauses affect image reprojection and resampling.
Syntax
Set Map
[ Window window_id ]
[ Image
[ Reprojection { None | Always | Auto } ]
[ Resampling { CubicConvolution | NearestNeighbor } ] ]
window_id is the integer window identifier of a Map window.
Description
image has two options, Reprojection and Resampling. Either or both of them can be used with the image clause.
Reprojection has three options, Always and Auto (for Automatic) and None.
- None means that MapInfo Pro treats raster layers as it has in pre-version 8.5 versions by conforming the vector layers to the raster layer.
- Always means that reprojection is always done; specifically, coordinates are calculated using precise formulae and pixels are resampled using "cubic convolution" or "nearest neighbor".
- Auto means that use of reprojection is decided based on how the destination image rectangle looks after having been transformed into the source image space. If it looks as a "rigorous" rectangle (two sides are parallel to x-axis and two sides parallel to y-axis), then the old MapInfo Pro code works, for example standard Windows functions are used for only stretching the source image in both directions. This is the fastest way of drawing resulting images. If the above is not the case (stretching is not enough because of non-linearities and/or skew of the destination image rectangle transformed into the source image space), the reprojection code works.
Resampling has two options, Cubic Convolution and Nearest Neighbor.
- CubicConvolution is a method of resampling images providing for the best "restoration" of pixel values unavailable in a source image (because of its discreteness). Here, a pixel of the destination image is calculated based on the pixel values in a 4x4 window centered at the "basic" pixel in the source image. The coordinates (real numbers, in general) of the basic pixel are calculated for every pixel of the destination image based on special optimized procedure. Pixels within the above window are weighted in a special way based on the mantissas of basic pixel coordinates.
- NearestNeighbor is a method of resampling images by merely putting the value of the basic pixel from a source image into the current pixel position.