1ogrinfo(1) General Commands Manual ogrinfo(1)
2
3
4
6 ogrinfo - .TH "ogrinfo" 1 "Fri Apr 22 2011" "GDAL"
7
9 ogrinfo - lists information about an OGR supported data source
10
12 ogrinfo [--help-general] [-ro] [-q] [-where restricted_where]
13 [-spat xmin ymin xmax ymax] [-fid fid]
14 [-sql statement] [-al] [-so] [-fields={YES/NO}]
15 [-geom={YES/NO/SUMMARY}][--formats]
16 datasource_name [layer [layer ...]]
17
18
20 The ogrinfo program lists various information about an OGR supported
21 data source to stdout (the terminal).
22
23 -ro:
24 Open the data source in read-only mode.
25
26 -al:
27 List all features of all layers (used instead of having to give
28 layer names as arguments).
29
30 -so:
31 Summary Only: supress listing of features, show only the summary
32 information like projection, schema, feature count and extents.
33
34 -q:
35 Quiet verbose reporting of various information, including
36 coordinate system, layer schema, extents, and feature count.
37
38 -where restricted_where:
39 An attribute query in a restricted form of the queries used in the
40 SQL WHERE statement. Only features matching the attribute query
41 will be reported.
42
43 -sql statement:
44 Execute the indicated SQL statement and return the result.
45
46 -spat xmin ymin xmax ymax:
47 The area of interest. Only features within the rectangle will be
48 reported.
49
50 -fid fid:
51 If provided, only the feature with this feature id will be
52 reported. Operates exclusive of the spatial or attribute queries.
53 Note: if you want to select several features based on their feature
54 id, you can also use the fact the 'fid' is a special field
55 recognized by OGR SQL. So, '-where 'fid in (1,3,5)'' would select
56 features 1, 3 and 5.
57
58 -fields={YES/NO}:
59 (starting with GDAL 1.6.0) If set to NO, the feature dump will not
60 display field values. Default value is YES.
61
62 -geom={YES/NO/SUMMARY}:
63 (starting with GDAL 1.6.0) If set to NO, the feature dump will not
64 display the geometry. If set to SUMMARY, only a summary of the
65 geometry will be displayed. If set to YES, the geometry will be
66 reported in full OGC WKT format. Default value is YES.
67
68 --formats:
69 List the format drivers that are enabled.
70
71 datasource_name:
72 The data source to open. May be a filename, directory or other
73 virtual name. See the OGR Vector Formats list for supported
74 datasources.
75
76 layer:
77 One or more layer names may be reported.
78
79 If no layer names are passed then ogrinfo will report a list of
80 available layers (and their layerwide geometry type). If layer name(s)
81 are given then their extents, coordinate system, feature count,
82 geometry type, schema and all features matching query parameters will
83 be reported to the terminal. If no query parameters are provided, all
84 features are reported.
85
86 Geometries are reported in OGC WKT format.
87
89 Example reporting all layers in an NTF file:
90
91 % ogrinfo wrk/SHETLAND_ISLANDS.NTF
92 INFO: Open of `wrk/SHETLAND_ISLANDS.NTF'
93 using driver `UK .NTF' successful.
94 1: BL2000_LINK (Line String)
95 2: BL2000_POLY (None)
96 3: BL2000_COLLECTIONS (None)
97 4: FEATURE_CLASSES (None)
98
99
100 Example using an attribute query is used to restrict the output of the
101 features in a layer:
102
103 % ogrinfo -ro -where 'GLOBAL_LINK_ID=185878' wrk/SHETLAND_ISLANDS.NTF BL2000_LINK
104 INFO: Open of `wrk/SHETLAND_ISLANDS.NTF'
105 using driver `UK .NTF' successful.
106
107 Layer name: BL2000_LINK
108 Geometry: Line String
109 Feature Count: 1
110 Extent: (419794.100000, 1069031.000000) - (419927.900000, 1069153.500000)
111 Layer SRS WKT:
112 PROJCS["OSGB 1936 / British National Grid",
113 GEOGCS["OSGB 1936",
114 DATUM["OSGB_1936",
115 SPHEROID["Airy 1830",6377563.396,299.3249646]],
116 PRIMEM["Greenwich",0],
117 UNIT["degree",0.0174532925199433]],
118 PROJECTION["Transverse_Mercator"],
119 PARAMETER["latitude_of_origin",49],
120 PARAMETER["central_meridian",-2],
121 PARAMETER["scale_factor",0.999601272],
122 PARAMETER["false_easting",400000],
123 PARAMETER["false_northing",-100000],
124 UNIT["metre",1]]
125 LINE_ID: Integer (6.0)
126 GEOM_ID: Integer (6.0)
127 FEAT_CODE: String (4.0)
128 GLOBAL_LINK_ID: Integer (10.0)
129 TILE_REF: String (10.0)
130 OGRFeature(BL2000_LINK):2
131 LINE_ID (Integer) = 2
132 GEOM_ID (Integer) = 2
133 FEAT_CODE (String) = (null)
134 GLOBAL_LINK_ID (Integer) = 185878
135 TILE_REF (String) = SHETLAND I
136 LINESTRING (419832.100 1069046.300,419820.100 1069043.800,419808.300
137 1069048.800,419805.100 1069046.000,419805.000 1069040.600,419809.400
138 1069037.400,419827.400 1069035.600,419842 1069031,419859.000
139 1069032.800,419879.500 1069049.500,419886.700 1069061.400,419890.100
140 1069070.500,419890.900 1069081.800,419896.500 1069086.800,419898.400
141 1069092.900,419896.700 1069094.800,419892.500 1069094.300,419878.100
142 1069085.600,419875.400 1069087.300,419875.100 1069091.100,419872.200
143 1069094.600,419890.400 1069106.400,419907.600 1069112.800,419924.600
144 1069133.800,419927.900 1069146.300,419927.600 1069152.400,419922.600
145 1069153.500,419917.100 1069153.500,419911.500 1069153.000,419908.700
146 1069152.500,419903.400 1069150.800,419898.800 1069149.400,419894.800
147 1069149.300,419890.700 1069149.400,419890.600 1069149.400,419880.800
148 1069149.800,419876.900 1069148.900,419873.100 1069147.500,419870.200
149 1069146.400,419862.100 1069143.000,419860 1069142,419854.900
150 1069138.600,419850 1069135,419848.800 1069134.100,419843
151 1069130,419836.200 1069127.600,419824.600 1069123.800,419820.200
152 1069126.900,419815.500 1069126.900,419808.200 1069116.500,419798.700
153 1069117.600,419794.100 1069115.100,419796.300 1069109.100,419801.800
154 1069106.800,419805.000 1069107.300)
155
156
158 Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer
159 <silke@intevation.de>
160
161
162
163GDAL Fri Apr 22 2011 ogrinfo(1)