Re-Projection Creates a New Image

Re-projecting an image adds or deletes pixels, creating a new image: this topic illustrates why.


All images imported into Manifold are rectangular because all raster image formats by definition have pixels arranged in rows and columns. Image windows show images as rectangles in the coordinates implied by the row and column arrangement of pixels, as computed to match the coordinate system in use.






For example, images shot from oblique space vehicle trajectories and published as "north up" images will be shown in a rectangular format, usually with black pixels padding the extra regions needed to make the image a perfect rectangle. The image above is a Landsat 7 shot of the region surrounding San Francisco Bay.


Re-projecting an image invariably changes its shape and leads to interpolation that changes the data. Re-projecting an image is, in effect, creating a new image.



Consider an image in its original rectangular format. All pixels are in locations adjacent to each other.



If we now re-project the image into some new projection (such as tilted perspective) we can imagine that the implied pixel locations will be pushed together in some regions and pulled apart in others. When shown in a map window within some projection the image will thus no longer be rectangular in shape.


We should keep in mind this is only a thought experiment since images always consist of pixels adjacent to each other. Although we can imagine that pixel locations are pushed together or pulled apart in real life an image always consists of a rectangular array of evenly-spaced and evenly-sized pixels.




When re-projecting an image, Manifold must take the implied locations of the pixels in the new form and transfer them to a new rectangular array of pixels. The color for each pixel in the new array is determined by sampling those color values at the implied projected points within it.




When projecting images Manifold will infer what size the new image should be to approximate the size of the original image. Using fewer pixels in height and width will result in re-sampling that on average reduces the accuracy of the interpolated new image. Using a higher number of pixels in height and width will provide finer sampling. By default, Manifold tries to guess at a reasonable size setting that will preserve the approximate overall size of the image in cases when re-projection does not result in radically different shapes.


Increasing the number of pixels in height and width of the re-projected image can not increase detail or improve resolution beyond that in the original image. Increasing the number of pixels in height and width beyond the size of the original image simply re-samples the same "big" original pixel over and over within adjacent new pixels.



The result of re-projection is an image that has visible pixels in the appropriate locations and otherwise is padded with transparent or other distinctive color pixels, such as black pixels that fill in regions where the re-projected image does not match the rectangular shape all images must have.

Vector Drawings are Different

Unlike re-projecting images, re-projecting vector drawings does not involve additions to or deletions from the data set. Even though re-projecting a vector drawing changes the shapes of objects it does not add or subtract objects from the drawing nor does it add or subtract from the number of coordinate pairs used to define each object. The shapes of all objects in drawings are defined by the coordinates used to draw those objects. Re-projecting a drawing simply changes the coordinates into different numbers but it neither adds to nor subtracts from the coordinate pairs used to draw objects.

Re-projecting for Speed in Maps

When an image is displayed in a map that uses a projection other than image's projection, the map window will automatically re-project the rendered view of the image into the projection used by the map, interpolating on the fly to add and delete pixels in the view as necessary.  That can be a time-consuming process for very large images and will slow down the display performance of the map.  Even though the map window is showing the image in a new projection, the map window's projection, it is not changing the actual image data. It is simply re-computing on the fly how the image would appear in the new projection.


If we get tired of a slow map window when large images must be re-projected we can either use Map Projection to change the projection of the map to that of the image, or we can use Change Coordinate System to re-project the image into the same projection used by the map window.  Map windows will be faster if the projection of the map is the same as the projection used by very large components shown as layers in the map.  


The images above are simulations and are not actual screen shots.  Manifold shows images in projected views too smoothly for a real screen shot to show the effects above.


See Also





Assign Initial Coordinate System


Change Coordinate System


Map Projection


Example: Assign Initial Coordinate System - Use the Component Pane to manually assign an initial coordinate system when importing from a format that does not specify the coordinate system.


Example: Change Projection of an Image - Use the Change Coordinate System command to change the projection of an image, raster data showing terrain elevations in a region of Florida, from Latitude / Longitude to Orthographic centered on Florida.


About Coordinate Systems