File: listgeo.html

package info (click to toggle)
libgeotiff 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,300 kB
  • sloc: ansic: 8,080; sh: 3,977; makefile: 166
file content (163 lines) | stat: -rw-r--r-- 7,467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<html>
<head>
<title>listgeo - Dump GeoTIFF Metadata</title>
</head>

<body  BGCOLOR="#FFFFFF">

<h1>listgeo - Dump GeoTIFF Metadata</h1>

<pre><b>
Usage: listgeo [-tfw] [-no_norm] [-proj4] [-t tabledir] inputfile
</b></pre>

The program listgeo takes a GeoTIFF file as input and dumps to
the standard output a GeoTIFF "metadata" file, which is human
readable, and may also be used as input to other programs which
use the "GTIFImport" routine, such as <a href="geotiff.html">geotifcp</a>.<p>

The <b>-tfw</b> flag may be passed to force generation of an ESRI style .tfw
file as well as the metadata file.  The ESRI world file is always given
the same basename as the input file, with the extension .tfw.  If one 
exists already it will be overwritten.<p>

The <b>-no_norm</b> flag will supress reporting of normalized parameters, and
reporting of corner points. <p>

The <b>-proj4</b> flag forces listgeo to report the PROJ.4 projection
string it uses for reprojecting corners to lat/long.<p>

<h2>GeoTIFF Metadata Format</h2>

For the formalist junkies, we will define a GeoTIFF metadata format
in an unambiguous fashion, and follow that by a concrete example.<p>

The metadata format is defined as follows (all strings not placed
between <braces> are string literals, case-sensitive, and any entry
followed by "*" or "*<number>" indicates multiple entries):<p>

<pre>
&lt;Geotiff_Metadata&gt; = &lt;Geotiff_Header&gt; + &lt;GeoTIFF_Body&gt; + &lt;GeoTIFF_Trailer&gt;

   &lt;Geotiff_Header&gt; = &lt;White_Space&gt; + Geotiff_Information: + &lt;Return&gt;
   &lt;GeoTIFF_Trailer&gt; = &lt;White_Space&gt; + End_Of_Geotiff. + &lt;Return&gt;
   &lt;GeoTIFF_Body&gt; = &lt;GeoTIFF_Info&gt; + &lt;GeoTIFF_Tags&gt; + &lt;GeoTIFF_Keys&gt;
      &lt;GeoTIFF_Info&gt; = &lt;GeoTIFF_Version&gt; + &lt;GeoTIFF_Revision&gt;
         &lt;GeoTIFF_Version&gt; = Version: + &lt;Single_Space&gt; + &lt;Version&gt; + &lt;Return&gt;
            &lt;Version&gt; = &lt;Integer&gt;
         &lt;GeoTIFF_Revision&gt; = Revision: + 
               &lt;Single_Space&gt; + &lt;Major_Rev&gt; + &lt;Period&gt; + &lt;Minor_Rev&gt; + &lt;Return&gt;
               &lt;Major_Rev&gt; = &lt;Integer&gt;
               &lt;Minor_Rev&gt; = &lt;Integer&gt;
      &lt;GeoTIFF_Tags&gt; =  &lt;Tag_Header&gt; + &lt;Tag_Entry&gt;* + &lt;Tag_Trailer&gt;
         &lt;Tag_Header&gt; = &lt;White_Space&gt; + Tagged_Information: + &lt;Return&gt;
         &lt;Tag_Trailer&gt; = &lt;White_Space&gt; + End_Of_Tags. + &lt;Return&gt;
         &lt;Tag_Entry&gt; = &lt;Tag_Entry_Header&gt; + &lt;Tag_Entry_Row&gt;*
            &lt;Tag_Entry_Header&gt; = &lt;White_Space&gt; + 
                     &lt;Tag_Name&gt; + &lt;Tag_Dimension&gt; + &lt;Colon&gt; + &lt;Return&gt;
               &lt;Tag_Dimension&gt;  = "(" + &lt;NRows&gt; + &lt;Comma&gt; + &lt;NCols&gt; + ")"
		 	      &lt;NRows&gt; = &lt;Integer&gt;
		 	      &lt;NCols&gt; = &lt;Integer&gt;
            &lt;Tag_Entry_Row&gt; = &lt;White_Space&gt; + &lt;Double_Float&gt;*&lt;NCols&gt; + &lt;Return&gt;
      &lt;GeoTIFF_Keys&gt; =  &lt;Key_Header&gt; + &lt;Key_Entry&gt;* + &lt;Key_Trailer&gt;
         &lt;Key_Header&gt; = &lt;White_Space&gt; + Keyed_Information: + &lt;Return&gt;
         &lt;Key_Trailer&gt; = &lt;White_Space&gt; + End_Of_Keys. + &lt;Return&gt;
         &lt;Key_Entry&gt; = &lt;Key_Entry_Header&gt; + &lt;Key_Entry_Value&gt;
            &lt;Key_Entry_Header&gt; = &lt;White_Space&gt; + 
                     &lt;Key_Name&gt; + &lt;Key_Dimension&gt; + &lt;Colon&gt; + &lt;Return&gt;
              &lt;Key_Dimension&gt; = "(" + &lt;Key_Format&gt; + &lt;Comma&gt; + &lt;Key_Count&gt; + ")"
            &lt;Key_Entry_Value&gt; = (&lt;Key_Value&gt; | &lt;Numeric_Value&gt; | &lt;Ascii_Value&gt;)
               &lt;Numeric_Value&gt; = (&lt;Integer&gt; | &lt;Double_Float&gt;)
               &lt;Ascii_Value&gt; = &lt;Double_Quote&gt; + &lt;String&gt; + &lt;Double_Quote&gt;

   &lt;Tag_Name&gt; = All symbolic tag names defined in GeoTIFF spec.
   &lt;Key_Name&gt; = All symbolic key names defined in GeoTIFF spec.
   &lt;Key_Value&gt; = All symbolic value names defined in GeoTIFF spec.
   &lt;Key_Format&gt; = (Short | Ascii | Double)
</pre>
   
And for the pedantic:
<pre>
   &lt;White_Space&gt; = (&lt;Single_Space&gt; | &lt;Tab&gt;)*
   &lt;Double_Float&gt; = &lt;Mantissa&gt;&lt;Exponent&gt;
   &lt;Mantissa&gt; = &lt;Sign&gt;&lt;Integer&gt;&lt;Period&gt;&lt;Integer&gt;
   &lt;Exponent&gt; = ( |e&lt;Sign&gt;&lt;Integer&gt;)
   &lt;Sign&gt; = ( |+|-)
   &lt;Integer&gt; = (0|1|2|3|4|5|6|7|8|9)*
   ...
</pre>

Following the formal metadata report, there is an optional (use -no_norm 
to supress) report on the <i>normalized</i> projection parameters for the
file.  This is an attempt to lookup PCS and GCS definitions to get detailed
datum, ellipsoid, and projection definitions for the file.  In general it
requires access to the EPSG database provided by the PROJ library to work
properly.<p>

Following the normalized projection information listgeo will report the
positions of the four corner coordinates, and if possible their lat/long
equivelents.  The corner coordinates are reported for tiepoint+scale and
transformation matrix formulations of GeoTIFF files, but not for multiple
tiepoint formulations.  The lat/long coordinates are only available if 
listgeo is compiled with PROJ.4, if the projection definition can be 
normalized, and if it is a projection supported by the listgeo PROJ.4 
binding.<p>

Example (default output of listgeo):<p>

<pre>
Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0                
         440720           3751320          0                
      ModelPixelScaleTag (1,3):
         60               60               0                
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,17): "UTM    11 S E000"
      GeogLinearUnitsGeoKey (Short,1): Linear_Meter
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_UTM_zone_11N
      End_Of_Keys.
   End_Of_Geotiff.

PCS = 26711 (NAD27 / UTM zone 11N)
Projection = 16011 (UTM zone 11N)
Projection Method: CT_TransverseMercator
   ProjNatOriginLatGeoKey: 0.000000 (  0d 0' 0.00"N)
   ProjNatOriginLongGeoKey: -117.000000 (117d 0' 0.00"W)
   ProjScaleAtNatOriginGeoKey: 0.999600
   ProjFalseEastingGeoKey: 500000.000000
   ProjFalseNorthingGeoKey: 0.000000
GCS: 4267/NAD27
Datum: 6267/North American Datum 1927
Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)

Corner Coordinates:
Upper Left    ( 440720.000,3751320.000)  (117d38'28.21"W, 33d54' 8.47"N)
Lower Left    ( 440720.000,3720600.000)  (117d38'20.79"W, 33d37'31.04"N)
Upper Right   ( 471440.000,3751320.000)  (117d18'32.07"W, 33d54'13.08"N)
Lower Right   ( 471440.000,3720600.000)  (117d18'28.50"W, 33d37'35.61"N)
Center        ( 456080.000,3735960.000)  (117d28'27.39"W, 33d45'52.46"N)
</pre>

<h2>See Also:</h2>

<ol> 
<li>
<a href="geotifcp.html">geotiffcp</a> - Copy TIFF installing GeoTIFF 
metadata.<p>
<li>
<a href="http://www.remotesensing.org/geotiff/geotiff.html">
http://www.remotesensing.org/geotiff/geotiff.html</a> - GeoTIFF/libgeotiff Home Page<p>

</ol>
</body>
</html>