georasterinfo
Description
info = georasterinfo(
returns a
filename
)RasterInfo
object
for the geographic or projected raster data file specified by filename
.
Supported file formats include Esri Binary Grid, Esri GridFloat, GeoTIFF, and DTED. For a
full list of supported formats, see Supported Formats and Extensions.
Examples
Get Information About Geospatial Raster Data
Get information about a geospatial raster data file by creating a RasterInfo
object.
info = georasterinfo('boston.tif');
Access individual properties of the RasterInfo
object using dot notation.
info.NativeFormat
ans = "uint8"
Get DTED Metadata
Get information about a DTED file by creating a RasterInfo
object. Get metadata specific to DTED files by accessing the Metadata
property of the RasterInfo
object.
info = georasterinfo('n39_w106_3arc_v2.dt1');
md = info.Metadata
md = struct with fields:
AREA_OR_POINT: "Point"
DTED_CompilationDate: "0002"
DTED_DataEdition: "02"
DTED_DigitizingSystem: "SRTM "
DTED_HorizontalAccuracy: "0013"
DTED_HorizontalDatum: "WGS84"
DTED_MaintenanceDate: "0000"
DTED_MaintenanceDescription: "0000"
DTED_MatchMergeDate: "0000"
DTED_MatchMergeVersion: "A"
DTED_NimaDesignator: "DTED1"
DTED_OriginLatitude: "0390000N"
DTED_OriginLongitude: "1060000W"
DTED_PartialCellIndicator: "00"
DTED_Producer: "USCNIMA "
DTED_RelHorizontalAccuracy: "NA "
DTED_RelVerticalAccuracy: "0006"
DTED_SecurityCode_DSI: "U"
DTED_SecurityCode_UHL: "U "
DTED_UniqueRef_DSI: "G19 107 "
DTED_UniqueRef_UHL: "G19 107 "
DTED_VerticalAccuracy_ACC: "0006"
DTED_VerticalAccuracy_UHL: "0006"
DTED_VerticalDatum: "E96"
Find the coordinates of the lower-left corner of the data by accessing the DTED_OriginLatitude
and DTED_OriginLongitude
fields of the metadata structure. The coordinates are stored as strings. Convert the strings to angles.
latS = md.DTED_OriginLatitude; lonS = md.DTED_OriginLongitude; latA = str2angle(latS)
latA = 39
lonA = str2angle(lonS)
lonA = -106
The DTED file used in this example is courtesy of the US Geological Survey.
Input Arguments
filename
— Name of raster data file
character vector | string scalar
Name of the raster data file, specified as a character vector or string scalar. The
form of filename
depends on the location of your file.
If the file is in your current folder or in a folder on the MATLAB® path, then specify the name of the file, such as
'myFile.dem'
.If the file is not in the current folder or in a folder on the MATLAB path, then specify the full or relative path name, such as
'C:\myfolder\myFile.tif'
or'dataDir\myFile.dat'
.
For a list of supported file formats, see Supported Formats and Extensions.
Data Types: char
| string
More About
Supported Formats and Extensions
The readgeoraster
and
georasterinfo
functions support these file formats and extensions.
In some cases, you can read supported file formats using extensions other than the ones
listed.
File Format | Extension |
---|---|
GeoTIFF |
|
Esri Binary Grid |
|
Esri ASCII Grid |
|
Esri GridFloat |
|
DTED |
|
SDTS |
|
USGS DEM |
|
ER Mapper ERS |
|
ENVI |
|
ERDAS IMAGINE |
|
Vertical Mapper Numeric Grid |
|
Vertical Mapper Classified Grid |
|
SRTM Height |
|
Some file formats consist of a data file and multiple supporting files. For example, Esri
GridFloat files may have supporting header files (.hdr
). When you read a
data file with supporting files using readgeoraster
or
georasterinfo
, specify the extension of the data file.
File formats may be referred to using different names. For example, the Esri GridFloat
format may also be referred to as Esri .hdr
Labelled or ITT ESRI
.hdr
RAW Raster. The Esri Binary Grid format may also be referred to
as ArcGrid Binary, Esri ArcGIS Binary Grid, or Esri ArcInfo Grid.
Version History
Introduced in R2020aR2021b: Get information about SRTM Height data
The georasterinfo
function can get information about SRTM Height
data files with extension .hgt
.
R2021a: Get information about data in Vertical Mapper Grid formats
The georasterinfo
function can get information about data in the
Vertical Mapper Numeric Grid and Vertical Mapper Classified Grid formats.
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)