1ogrinfo(1)                  General Commands Manual                 ogrinfo(1)
2
3
4

NAME

6       ogrinfoLists information about an OGR supported data source.
7

SYNOPSIS

9       ogrinfo [--help-general] [-ro] [-q] [-where restricted_where|@filename]
10               [-spat xmin ymin xmax ymax] [-geomfield field] [-fid fid]
11               [-sql statement|@filename] [-dialect dialect] [-al] [-rl] [-so] [-fields={YES/NO}]
12               [-geom={YES/NO/SUMMARY/WKT/ISO_WKT}] [--formats] [[-oo NAME=VALUE] ...]
13               [-nomd] [-listmdd] [-mdd domain|`all`]*
14               [-nocount] [-noextent] [-wkt_format WKT1|WKT2|...]
15               datasource_name [layer [layer ...]].fi
16

DESCRIPTION

18       The ogrinfo program lists various information about an OGR supported
19       data source to stdout (the terminal).
20
21       -ro:
22           Open the data source in read-only mode.
23
24       -al:
25           List all features of all layers (used instead of having to give
26           layer names as arguments).
27
28       -rl:
29           (Available in GDAL 2.2) Enable random layer reading mode, i.e.
30           iterate over features in the order they are found in the dataset,
31           and not layer per layer. This can be significantly faster for some
32           formats (for example OSM, GMLAS).
33
34       -so:
35           Summary Only: suppress listing of features, show only the summary
36           information like projection, schema, feature count and extents.
37
38       -q:
39           Quiet verbose reporting of various information, including
40           coordinate system, layer schema, extents, and feature count.
41
42       -where restricted_where:
43           An attribute query in a restricted form of the queries used in the
44           SQL WHERE statement. Only features matching the attribute query
45           will be reported. Starting with GDAL 2.1, the \filename syntax can
46           be used to indicate that the content is in the pointed filename.
47
48       -sql statement:
49           Execute the indicated SQL statement and return the result. Starting
50           with GDAL 2.1, the @filename syntax can be used to indicate that
51           the content is in the pointed filename.
52
53       -dialect dialect:
54           SQL dialect. In some cases can be used to use (unoptimized) OGR SQL
55           instead of the native SQL of an RDBMS by passing OGRSQL. Starting
56           with GDAL 1.10, the 'SQLITE' dialect can also be used with any
57           datasource.
58
59       -spat xmin ymin xmax ymax:
60           The area of interest. Only features within the rectangle will be
61           reported.
62
63       -geomfield field:
64           (OGR >= 1.11) Name of the geometry field on which the spatial
65           filter operates on.
66
67       -fid fid:
68           If provided, only the feature with this feature id will be
69           reported. Operates exclusive of the spatial or attribute queries.
70           Note: if you want to select several features based on their feature
71           id, you can also use the fact the 'fid' is a special field
72           recognized by OGR SQL. So, '-where 'fid in (1,3,5)'' would select
73           features 1, 3 and 5.
74
75       -fields={YES/NO}:
76           (starting with GDAL 1.6.0) If set to NO, the feature dump will not
77           display field values. Default value is YES.
78
79       -geom={YES/NO/SUMMARY/WKT/ISO_WKT}:
80           (starting with GDAL 1.6.0) If set to NO, the feature dump will not
81           display the geometry. If set to SUMMARY, only a summary of the
82           geometry will be displayed. If set to YES or ISO_WKT, the geometry
83           will be reported in full OGC WKT format. If set to WKT the geometry
84           will be reported in legacy WKT. Default value is YES. (WKT and
85           ISO_WKT are available starting with GDAL 2.1, which also changes
86           the default to ISO_WKT)
87
88       -oo NAME=VALUE:
89           (starting with GDAL 2.0) Dataset open option (format specific)
90
91       -nomd
92           (starting with GDAL 2.0) Suppress metadata printing. Some datasets
93           may contain a lot of metadata strings.
94
95       -listmdd
96           (starting with GDAL 2.0) List all metadata domains available for
97           the dataset.
98
99       -mdd domain
100           (starting with GDAL 2.0) Report metadata for the specified domain.
101           'all' can be used to report metadata in all domains
102
103       -nocount
104           (starting with GDAL 2.0) Suppress feature count printing.
105
106       -noextent
107           (starting with GDAL 2.0) Suppress spatial extent printing.
108
109       --formats:
110           List the format drivers that are enabled.
111
112       -wkt_format WKT1/WKT2/...
113           (GDAL >= 3.0) WKT format used to display the SRS. Currently
114           supported values are: WKT1, WKT2 (latest WKT version, currently
115           WKT2_2018), WKT2_2015, WKT2_2018
116
117       datasource_name:
118           The data source to open. May be a filename, directory or other
119           virtual name. See the OGR Vector Formats list for supported
120           datasources.
121
122       layer:
123           One or more layer names may be reported.
124
125       If no layer names are passed then ogrinfo will report a list of
126       available layers (and their layer wide geometry type). If layer name(s)
127       are given then their extents, coordinate system, feature count,
128       geometry type, schema and all features matching query parameters will
129       be reported to the terminal. If no query parameters are provided, all
130       features are reported.
131
132       Geometries are reported in OGC WKT format.
133

EXAMPLE

135       Example reporting all layers in an NTF file:
136
137       % ogrinfo wrk/SHETLAND_ISLANDS.NTF
138       INFO: Open of `wrk/SHETLAND_ISLANDS.NTF'
139       using driver `UK .NTF' successful.
140       1: BL2000_LINK (Line String)
141       2: BL2000_POLY (None)
142       3: BL2000_COLLECTIONS (None)
143       4: FEATURE_CLASSES (None)
144
145
146       Example using an attribute query is used to restrict the output of the
147       features in a layer:
148
149       % ogrinfo -ro -where 'GLOBAL_LINK_ID=185878' wrk/SHETLAND_ISLANDS.NTF BL2000_LINK
150       INFO: Open of `wrk/SHETLAND_ISLANDS.NTF'
151       using driver `UK .NTF' successful.
152
153       Layer name: BL2000_LINK
154       Geometry: Line String
155       Feature Count: 1
156       Extent: (419794.100000, 1069031.000000) - (419927.900000, 1069153.500000)
157       Layer SRS WKT:
158       PROJCS["OSGB 1936 / British National Grid",
159           GEOGCS["OSGB 1936",
160               DATUM["OSGB_1936",
161                   SPHEROID["Airy 1830",6377563.396,299.3249646]],
162               PRIMEM["Greenwich",0],
163               UNIT["degree",0.0174532925199433]],
164           PROJECTION["Transverse_Mercator"],
165           PARAMETER["latitude_of_origin",49],
166           PARAMETER["central_meridian",-2],
167           PARAMETER["scale_factor",0.999601272],
168           PARAMETER["false_easting",400000],
169           PARAMETER["false_northing",-100000],
170           UNIT["metre",1]]
171       LINE_ID: Integer (6.0)
172       GEOM_ID: Integer (6.0)
173       FEAT_CODE: String (4.0)
174       GLOBAL_LINK_ID: Integer (10.0)
175       TILE_REF: String (10.0)
176       OGRFeature(BL2000_LINK):2
177         LINE_ID (Integer) = 2
178         GEOM_ID (Integer) = 2
179         FEAT_CODE (String) = (null)
180         GLOBAL_LINK_ID (Integer) = 185878
181         TILE_REF (String) = SHETLAND I
182         LINESTRING (419832.100 1069046.300,419820.100 1069043.800,419808.300
183         1069048.800,419805.100 1069046.000,419805.000 1069040.600,419809.400
184         1069037.400,419827.400 1069035.600,419842 1069031,419859.000
185         1069032.800,419879.500 1069049.500,419886.700 1069061.400,419890.100
186         1069070.500,419890.900 1069081.800,419896.500 1069086.800,419898.400
187         1069092.900,419896.700 1069094.800,419892.500 1069094.300,419878.100
188         1069085.600,419875.400 1069087.300,419875.100 1069091.100,419872.200
189         1069094.600,419890.400 1069106.400,419907.600 1069112.800,419924.600
190         1069133.800,419927.900 1069146.300,419927.600 1069152.400,419922.600
191         1069153.500,419917.100 1069153.500,419911.500 1069153.000,419908.700
192         1069152.500,419903.400 1069150.800,419898.800 1069149.400,419894.800
193         1069149.300,419890.700 1069149.400,419890.600 1069149.400,419880.800
194         1069149.800,419876.900 1069148.900,419873.100 1069147.500,419870.200
195         1069146.400,419862.100 1069143.000,419860 1069142,419854.900
196         1069138.600,419850 1069135,419848.800 1069134.100,419843
197         1069130,419836.200 1069127.600,419824.600 1069123.800,419820.200
198         1069126.900,419815.500 1069126.900,419808.200 1069116.500,419798.700
199         1069117.600,419794.100 1069115.100,419796.300 1069109.100,419801.800
200         1069106.800,419805.000  1069107.300)
201
202

AUTHORS

204       Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de
205
206
207
208GDAL                            Tue Mar 3 2020                      ogrinfo(1)
Impressum