Template:Image And Raster Projections
Image And Raster Projections
Most raster data has a projection and coordinates (X, Y, and possibly Z locations of each raster cell) associated with it. The projection contains information about how to map the coordinates in the raster to actual horizontal and vertical locations on the surface of the earth.
Storing Projection Information
When loading an image or a raster, GMS, SMS, or WMS (referred to collectively as XMS) determines the horizontal projection using GDAL. This will be based on either a projection file (*.prj) or internal projection information in the raster.
If vertical projection information (vertical datum and units) is available for the image or raster, XMS reads the information and stores it internally.
If changing any projection information for a raster loaded into the a project, the XMS software saves a new raster in GeoTiff format.
Occasionally, a raster will exist that does not contain elevation data (for example, concentration values). In this case, XMS stores a metadata flag (read only by GMS, SMS, and WMS) with the raster stating that the raster does not have elevation units. When this metadata flag is found by XMS, none of the vertical values are reprojected after reading the raster.
XMS uses GeoTiffs to export rasters with horizontal and vertical projection information for use in other GIS programs.
When loading a raster, if there are no vertical units found in the raster, and the vertical values are treated as elevations, XMS prompts the user for the vertical units and exports a new raster as a GeoTiff. Also, if the vertical units do not match the horizontal units and the file being loaded is not a GeoTiff file, XMS prompts the user to confirm the vertical units and exports a new raster as a GeoTiff.
Saving Projection Information with a Raster
XMS imports rasters in a wide variety of supported formats. XMS exports rasters in either GeoTiff or Arc/Info ASCII Grid formats. No other formats are currently supported for exporting raster data.
When exporting a GeoTiff, the horizontal and vertical projection information is stored internally in the file. When saving an Arc/Info ASCII Grid file, the horizontal and vertical projection information is stored in a projection file (*.prj) and metadata file. All the necessary horizontal and vertical projection information is read into XMS (or other GIS programs such as ArcGIS) in these formats.