| Mapping Toolbox™ | ![]() |
info = geotiffinfo(filename)
info = geotiffinfo(url)
info = geotiffinfo(filename) returns a structure whose fields contain image properties and cartographic information about a GeoTIFF file.
filename is a string that specifies the name of the GeoTIFF file. filename can include the directory name; otherwise, the file must be in the current directory or in a directory on the MATLAB path. If the named file includes the extension .TIF or .TIFF (either upper- or lowercase), the extension can be omitted from filename.
If filename is a file containing more than one GeoTIFF image, info is a structure array with one element for each image in the file. For example, info(3) would contain information about the third image in the file. If more than one image exists in the file, it is assumed that each image will have the same cartographic information and the same image width and height.
info = geotiffinfo(url) reads the GeoTIFF image from an Internet URL. The url must include the protocol type (e.g., "http://").
The info structure contains the following fields:
Filename | String containing the name of the file |
FileModDate | String containing the modification date of the file |
FileSize | Integer indicating the size of the file in bytes |
Format | String containing the file format, which should always be 'tiff' |
FormatVersion | String or number specifying the file format version |
Height | Integer indicating the height of the image in pixels |
Width | Integer indicating the width of the image in pixels |
BitDepth | Integer indicating the number of bits per pixel |
ColorType | String indicating the type of image: 'truecolor' for a true-color (RGB) image, 'grayscale' for a grayscale image, or 'indexed' for an indexed image |
ModelType | String indicating the type of coordinate system used to georeference the image: 'ModelTypeProjected', 'ModelTypeGeographic', or '' |
PCS | String describing the projected coordinate system |
Projection | String describing the EPSG identifier for the underlying projection method |
MapSys | String indicating the map system, if applicable: 'STATE_PLANE_27', 'STATE_PLANE_83', 'UTM_NORTH', 'UTM_SOUTH', or '' |
Zone | Double indicating the UTM or State Plane Zone number, empty ([]) if not applicable or unknown |
CTProjection | String containing the GeoTIFF identifier for the underlying projection method |
ProjParm | An N-by-1 double containing projection parameter values. The identity of each element is specified by the corresponding element of ProjParmId. Lengths are in meters, angles in decimal degrees. |
ProjParmId | An N-by-1 cell array listing the projection parameter identifier for each corresponding numerical element of ProjParm:
|
GCS | String indicating the geographic coordinate system |
Datum | String indicating the projection datum type, such as 'North American Datum 1927' or 'North American Datum 1983' |
Ellipsoid | String indicating the ellipsoid name as defined by the ellipsoid.csv EPSG file |
SemiMajor | Double indicating the length of the semimajor axis of the ellipsoid, in meters |
SemiMinor | Double indicating the length of the semiminor axis of the ellipsoid, in meters |
PM | String indicating the prime meridian location, for example, 'Greenwich' or 'Paris' |
PmLongToGreenwich | Double indicating the decimal degrees of longitude between this prime meridian and Greenwich. Prime meridians to the west of Greenwich are negative. |
UOMLength | String indicating the units of length used in the projected coordinate system |
UOMLengthInMeters | Double defining the UOMLength unit in meters |
UOMAngle | String indicating the angular units used for geographic coordinates |
UOMAngleInDegrees | Double defining the UOMAngle unit in degrees |
TiePoints | Structure containing the image tiepoints. The structure contains these fields:
|
PixelScale | 3-by-1 double array that specifies the X, Y, Z pixel scale values |
RefMatrix | 3-by-2 double referencing matrix that must be unambiguously defined by the GeoTIFF file; otherwise it is returned empty ([]). |
BoundingBox | 2-by-2 double array that specifies the minimum (row 1) and maximum (row 2) values for each dimension of the image data in the GeoTIFF file |
CornerCoords | A structure with six fields that contains coordinates of the outer corners of the GeoTIFF image. Each field is a 1-by-4 double array, or empty ([]) if unknown. The arrays contain the coordinates of the outer corners of the corner pixels, starting from the (1,1) corner and proceeding clockwise:
|
GeoTIFFCodes | Structure containing raw numeric values for those GeoTIFF fields that are encoded numerically in the file. These raw values, converted to a string elsewhere in the INFO structure, are provided here for reference. The GeoTIFFCodes fields are:
|
ImageDescription | String describing the image; if no description is included in the file, the field is omitted. |
info = geotiffinfo('boston.tif')
info =
Filename: [1x78 char]
FileModDate: '31-May-2007 03:25:30'
FileSize: 38729900
Format: 'tif'
FormatVersion: []
Height: 2881
Width: 4481
BitDepth: 24
ColorType: 'truecolor'
ModelType: 'ModelTypeProjected'
PCS: 'NAD83 / Massachusetts Mainland'
Projection: 'SPCS83 Massachusetts Mainland zone (m)'
MapSys: 'STATE_PLANE_83'
Zone: 2001
CTProjection: 'CT_LambertConfConic_2SP'
ProjParm: [7x1 double]
ProjParmId: {7x1 cell}
GCS: 'NAD83'
Datum: 'North American Datum 1983'
Ellipsoid: 'GRS 1980'
SemiMajor: 6378137
SemiMinor: 6.3568e+006
PM: 'Greenwich'
PMLongToGreenwich: 0
UOMLength: 'US survey foot'
UOMLengthInMeters: 0.3048
UOMAngle: 'degree'
UOMAngleInDegrees: 1.0000
TiePoints: [1x1 struct]
PixelScale: [3x1 double]
RefMatrix: [3x2 double]
BoundingBox: [2x2 double]
CornerCoords: [1x1 struct]
GeoTIFFCodes: [1x1 struct]
ImageDescription: '"GeoEye"'imfinfo, geotiffread, makerefmat, projfwd, projinv, projlist
![]() | geotiff2mstruct | geotiffread | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |