| 1 |
<html> |
| 2 |
<head> |
| 3 |
<title>listgeo - Dump GeoTIFF Metadata</title> |
| 4 |
</head> |
| 5 |
|
| 6 |
<body BGCOLOR="#FFFFFF"> |
| 7 |
|
| 8 |
<h1>listgeo - Dump GeoTIFF Metadata</h1> |
| 9 |
|
| 10 |
<pre><b> |
| 11 |
Usage: listgeo [-tfw] [-no_norm] [-proj4] [-t tabledir] inputfile |
| 12 |
</b></pre> |
| 13 |
|
| 14 |
The program listgeo takes a GeoTIFF file as input and dumps to |
| 15 |
the standard output a GeoTIFF "metadata" file, which is human |
| 16 |
readable, and may also be used as input to other programs which |
| 17 |
use the "GTIFImport" routine, such as <a href="geotiff.html">geotifcp</a>.<p> |
| 18 |
|
| 19 |
The <b>-tfw</b> flag may be passed to force generation of an ESRI style .tfw |
| 20 |
file as well as the metadata file. The ESRI world file is always given |
| 21 |
the same basename as the input file, with the extension .tfw. If one |
| 22 |
exists already it will be overwritten.<p> |
| 23 |
|
| 24 |
The <b>-no_norm</b> flag will supress reporting of normalized parameters, and |
| 25 |
reporting of corner points. <p> |
| 26 |
|
| 27 |
The <b>-proj4</b> flag forces listgeo to report the PROJ.4 projection |
| 28 |
string it uses for reprojecting corners to lat/long.<p> |
| 29 |
|
| 30 |
<h2>GeoTIFF Metadata Format</h2> |
| 31 |
|
| 32 |
For the formalist junkies, we will define a GeoTIFF metadata format |
| 33 |
in an unambiguous fashion, and follow that by a concrete example.<p> |
| 34 |
|
| 35 |
The metadata format is defined as follows (all strings not placed |
| 36 |
between <braces> are string literals, case-sensitive, and any entry |
| 37 |
followed by "*" or "*<number>" indicates multiple entries):<p> |
| 38 |
|
| 39 |
<pre> |
| 40 |
<Geotiff_Metadata> = <Geotiff_Header> + <GeoTIFF_Body> + <GeoTIFF_Trailer> |
| 41 |
|
| 42 |
<Geotiff_Header> = <White_Space> + Geotiff_Information: + <Return> |
| 43 |
<GeoTIFF_Trailer> = <White_Space> + End_Of_Geotiff. + <Return> |
| 44 |
<GeoTIFF_Body> = <GeoTIFF_Info> + <GeoTIFF_Tags> + <GeoTIFF_Keys> |
| 45 |
<GeoTIFF_Info> = <GeoTIFF_Version> + <GeoTIFF_Revision> |
| 46 |
<GeoTIFF_Version> = Version: + <Single_Space> + <Version> + <Return> |
| 47 |
<Version> = <Integer> |
| 48 |
<GeoTIFF_Revision> = Revision: + |
| 49 |
<Single_Space> + <Major_Rev> + <Period> + <Minor_Rev> + <Return> |
| 50 |
<Major_Rev> = <Integer> |
| 51 |
<Minor_Rev> = <Integer> |
| 52 |
<GeoTIFF_Tags> = <Tag_Header> + <Tag_Entry>* + <Tag_Trailer> |
| 53 |
<Tag_Header> = <White_Space> + Tagged_Information: + <Return> |
| 54 |
<Tag_Trailer> = <White_Space> + End_Of_Tags. + <Return> |
| 55 |
<Tag_Entry> = <Tag_Entry_Header> + <Tag_Entry_Row>* |
| 56 |
<Tag_Entry_Header> = <White_Space> + |
| 57 |
<Tag_Name> + <Tag_Dimension> + <Colon> + <Return> |
| 58 |
<Tag_Dimension> = "(" + <NRows> + <Comma> + <NCols> + ")" |
| 59 |
<NRows> = <Integer> |
| 60 |
<NCols> = <Integer> |
| 61 |
<Tag_Entry_Row> = <White_Space> + <Double_Float>*<NCols> + <Return> |
| 62 |
<GeoTIFF_Keys> = <Key_Header> + <Key_Entry>* + <Key_Trailer> |
| 63 |
<Key_Header> = <White_Space> + Keyed_Information: + <Return> |
| 64 |
<Key_Trailer> = <White_Space> + End_Of_Keys. + <Return> |
| 65 |
<Key_Entry> = <Key_Entry_Header> + <Key_Entry_Value> |
| 66 |
<Key_Entry_Header> = <White_Space> + |
| 67 |
<Key_Name> + <Key_Dimension> + <Colon> + <Return> |
| 68 |
<Key_Dimension> = "(" + <Key_Format> + <Comma> + <Key_Count> + ")" |
| 69 |
<Key_Entry_Value> = (<Key_Value> | <Numeric_Value> | <Ascii_Value>) |
| 70 |
<Numeric_Value> = (<Integer> | <Double_Float>) |
| 71 |
<Ascii_Value> = <Double_Quote> + <String> + <Double_Quote> |
| 72 |
|
| 73 |
<Tag_Name> = All symbolic tag names defined in GeoTIFF spec. |
| 74 |
<Key_Name> = All symbolic key names defined in GeoTIFF spec. |
| 75 |
<Key_Value> = All symbolic value names defined in GeoTIFF spec. |
| 76 |
<Key_Format> = (Short | Ascii | Double) |
| 77 |
</pre> |
| 78 |
|
| 79 |
And for the pedantic: |
| 80 |
<pre> |
| 81 |
<White_Space> = (<Single_Space> | <Tab>)* |
| 82 |
<Double_Float> = <Mantissa><Exponent> |
| 83 |
<Mantissa> = <Sign><Integer><Period><Integer> |
| 84 |
<Exponent> = ( |e<Sign><Integer>) |
| 85 |
<Sign> = ( |+|-) |
| 86 |
<Integer> = (0|1|2|3|4|5|6|7|8|9)* |
| 87 |
... |
| 88 |
</pre> |
| 89 |
|
| 90 |
Following the formal metadata report, there is an optional (use -no_norm |
| 91 |
to supress) report on the <i>normalized</i> projection parameters for the |
| 92 |
file. This is an attempt to lookup PCS and GCS definitions to get detailed |
| 93 |
datum, ellipsoid, and projection definitions for the file. In general it |
| 94 |
requires access to the EPSG database provided by the PROJ library to work |
| 95 |
properly.<p> |
| 96 |
|
| 97 |
Following the normalized projection information listgeo will report the |
| 98 |
positions of the four corner coordinates, and if possible their lat/long |
| 99 |
equivelents. The corner coordinates are reported for tiepoint+scale and |
| 100 |
transformation matrix formulations of GeoTIFF files, but not for multiple |
| 101 |
tiepoint formulations. The lat/long coordinates are only available if |
| 102 |
listgeo is compiled with PROJ.4, if the projection definition can be |
| 103 |
normalized, and if it is a projection supported by the listgeo PROJ.4 |
| 104 |
binding.<p> |
| 105 |
|
| 106 |
Example (default output of listgeo):<p> |
| 107 |
|
| 108 |
<pre> |
| 109 |
Geotiff_Information: |
| 110 |
Version: 1 |
| 111 |
Key_Revision: 1.0 |
| 112 |
Tagged_Information: |
| 113 |
ModelTiepointTag (2,3): |
| 114 |
0 0 0 |
| 115 |
440720 3751320 0 |
| 116 |
ModelPixelScaleTag (1,3): |
| 117 |
60 60 0 |
| 118 |
End_Of_Tags. |
| 119 |
Keyed_Information: |
| 120 |
GTModelTypeGeoKey (Short,1): ModelTypeProjected |
| 121 |
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea |
| 122 |
GTCitationGeoKey (Ascii,17): "UTM 11 S E000" |
| 123 |
GeogLinearUnitsGeoKey (Short,1): Linear_Meter |
| 124 |
GeogAngularUnitsGeoKey (Short,1): Angular_Degree |
| 125 |
ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_UTM_zone_11N |
| 126 |
End_Of_Keys. |
| 127 |
End_Of_Geotiff. |
| 128 |
|
| 129 |
PCS = 26711 (NAD27 / UTM zone 11N) |
| 130 |
Projection = 16011 (UTM zone 11N) |
| 131 |
Projection Method: CT_TransverseMercator |
| 132 |
ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N) |
| 133 |
ProjNatOriginLongGeoKey: -117.000000 (117d 0' 0.00"W) |
| 134 |
ProjScaleAtNatOriginGeoKey: 0.999600 |
| 135 |
ProjFalseEastingGeoKey: 500000.000000 |
| 136 |
ProjFalseNorthingGeoKey: 0.000000 |
| 137 |
GCS: 4267/NAD27 |
| 138 |
Datum: 6267/North American Datum 1927 |
| 139 |
Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80) |
| 140 |
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E) |
| 141 |
Projection Linear Units: 9001/metre (1.000000m) |
| 142 |
|
| 143 |
Corner Coordinates: |
| 144 |
Upper Left ( 440720.000,3751320.000) (117d38'28.21"W, 33d54' 8.47"N) |
| 145 |
Lower Left ( 440720.000,3720600.000) (117d38'20.79"W, 33d37'31.04"N) |
| 146 |
Upper Right ( 471440.000,3751320.000) (117d18'32.07"W, 33d54'13.08"N) |
| 147 |
Lower Right ( 471440.000,3720600.000) (117d18'28.50"W, 33d37'35.61"N) |
| 148 |
Center ( 456080.000,3735960.000) (117d28'27.39"W, 33d45'52.46"N) |
| 149 |
</pre> |
| 150 |
|
| 151 |
<h2>See Also:</h2> |
| 152 |
|
| 153 |
<ol> |
| 154 |
<li> |
| 155 |
<a href="geotifcp.html">geotiffcp</a> - Copy TIFF installing GeoTIFF |
| 156 |
metadata.<p> |
| 157 |
<li> |
| 158 |
<a href="http://www.remotesensing.org/geotiff/geotiff.html"> |
| 159 |
http://www.remotesensing.org/geotiff/geotiff.html</a> - GeoTIFF/libgeotiff Home Page<p> |
| 160 |
|
| 161 |
</ol> |
| 162 |
</body> |
| 163 |
</html> |