.\" Man page generated from reStructuredText. . .TH "OGRINFO" "1" "Mar 05, 2021" "" "GDAL" .SH NAME ogrinfo \- Lists information about an OGR-supported data source. . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ogrinfo [\-\-help\-general] [\-ro] [\-q] [\-where restricted_where|\e@filename] [\-spat xmin ymin xmax ymax] [\-geomfield field] [\-fid fid] [\-sql statement|\e@filename] [\-dialect dialect] [\-al] [\-rl] [\-so] [\-fields={YES/NO}] [\-geom={YES/NO/SUMMARY/WKT/ISO_WKT}] [\-\-formats] [[\-oo NAME=VALUE] ...] [\-nomd] [\-listmdd] [\-mdd domain|\(gaall\(ga]* [\-nocount] [\-noextent] [\-nogeomtype] [\-wkt_format WKT1|WKT2|...] [ [ ...]] .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fBogrinfo\fP program lists various information about an OGR\-supported data source to stdout (the terminal). .INDENT 0.0 .TP .B \-ro Open the data source in read\-only mode. .UNINDENT .INDENT 0.0 .TP .B \-al List all features of all layers (used instead of having to give layer names as arguments). .UNINDENT .INDENT 0.0 .TP .B \-rl Enable random layer reading mode, i.e. iterate over features in the order they are found in the dataset, and not layer per layer. This can be significantly faster for some formats (for example OSM, GMLAS). .sp New in version 2.2. .UNINDENT .INDENT 0.0 .TP .B \-so Summary Only: suppress listing of individual features and show only summary information like projection, schema, feature count and extents. .UNINDENT .INDENT 0.0 .TP .B \-q Quiet verbose reporting of various information, including coordinate system, layer schema, extents, and feature count. .UNINDENT .INDENT 0.0 .TP .B \-where An attribute query in a restricted form of the queries used in the SQL \fIWHERE\fP statement. Only features matching the attribute query will be reported. Starting with GDAL 2.1, the \fB\efilename\fP syntax can be used to indicate that the content is in the pointed filename. .UNINDENT .INDENT 0.0 .TP .B \-sql Execute the indicated SQL statement and return the result. Starting with GDAL 2.1, the \fB@filename\fP syntax can be used to indicate that the content is in the pointed filename. .UNINDENT .INDENT 0.0 .TP .B \-dialect SQL dialect. In some cases can be used to use (unoptimized) OGR SQL instead of the native SQL of an RDBMS by passing OGRSQL. The "SQLITE" dialect can also be used with any datasource. .UNINDENT .INDENT 0.0 .TP .B \-spat The area of interest. Only features within the rectangle will be reported. .UNINDENT .INDENT 0.0 .TP .B \-geomfield Name of the geometry field on which the spatial filter operates. .UNINDENT .INDENT 0.0 .TP .B \-fid If provided, only the feature with this feature id will be reported. Operates exclusive of the spatial or attribute queries. Note: if you want to select several features based on their feature id, you can also use the fact the \(aqfid\(aq is a special field recognized by OGR SQL. So, \fI\-where "fid in (1,3,5)"\fP would select features 1, 3 and 5. .UNINDENT .INDENT 0.0 .TP .B \-fields YES|NO: If set to \fBNO\fP, the feature dump will not display field values. Default value is \fBYES\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-geom YES|NO|SUMMARY|WKT|ISO_WKT If set to \fBNO\fP, the feature dump will not display the geometry. If set to \fBSUMMARY\fP, only a summary of the geometry will be displayed. If set to \fBYES\fP or \fBISO_WKT\fP, the geometry will be reported in full OGC WKT format. If set to \fBWKT\fP the geometry will be reported in legacy \fBWKT\fP\&. Default value is \fBYES\fP\&. (WKT and \fBISO_WKT\fP are available starting with GDAL 2.1, which also changes the default to ISO_WKT) .UNINDENT .INDENT 0.0 .TP .B \-oo NAME=VALUE Dataset open option (format\-specific) .UNINDENT .INDENT 0.0 .TP .B \-nomd Suppress metadata printing. Some datasets may contain a lot of metadata strings. .UNINDENT .INDENT 0.0 .TP .B \-listmdd List all metadata domains available for the dataset. .UNINDENT .INDENT 0.0 .TP .B \-mdd Report metadata for the specified domain. \fBall\fP can be used to report metadata in all domains. .UNINDENT .INDENT 0.0 .TP .B \-nocount Suppress feature count printing. .UNINDENT .INDENT 0.0 .TP .B \-noextent Suppress spatial extent printing. .UNINDENT .INDENT 0.0 .TP .B \-nogeomtype Suppress layer geometry type printing. .sp New in version 3.1. .UNINDENT .INDENT 0.0 .TP .B \-\-formats List the format drivers that are enabled. .UNINDENT .INDENT 0.0 .TP .B \-wkt_format The WKT format used to display the SRS. Currently supported values for the \fBformat\fP are: .sp \fBWKT1\fP .sp \fBWKT2\fP (latest WKT version, currently \fIWKT2_2018\fP) .sp \fBWKT2_2015\fP .sp \fBWKT2_2018\fP .sp New in version 3.0.0. .UNINDENT .INDENT 0.0 .TP .B The data source to open. May be a filename, directory or other virtual name. See the OGR Vector Formats list for supported datasources. .UNINDENT .INDENT 0.0 .TP .B One or more layer names may be reported. If no layer names are passed then ogrinfo will report a list of available layers (and their layer wide geometry type). If layer name(s) are given then their extents, coordinate system, feature count, geometry type, schema and all features matching query parameters will be reported to the terminal. If no query parameters are provided, all features are reported. .UNINDENT .sp Geometries are reported in OGC WKT format. .SH EXAMPLE .sp Example reporting all layers in an NTF file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ogrinfo wrk/SHETLAND_ISLANDS.NTF # INFO: Open of \(gawrk/SHETLAND_ISLANDS.NTF\(aq # using driver \(gaUK .NTF\(aq successful. # 1: BL2000_LINK (Line String) # 2: BL2000_POLY (None) # 3: BL2000_COLLECTIONS (None) # 4: FEATURE_CLASSES (None) .ft P .fi .UNINDENT .UNINDENT .sp Example of retrieving a summary (\fB\-so\fP) of a layer without showing details about every single feature. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ogrinfo \e \-so \e natural_earth_vector.gpkg \e ne_10m_admin_0_antarctic_claim_limit_lines # INFO: Open of \(ganatural_earth_vector.gpkg\(aq # using driver \(gaGPKG\(aq successful. # Layer name: ne_10m_admin_0_antarctic_claim_limit_lines # Geometry: Line String # Feature Count: 23 # Extent: (\-150.000000, \-90.000000) \- (160.100000, \-60.000000) # Layer SRS WKT: # GEOGCS["WGS 84", # DATUM["WGS_1984", # SPHEROID["WGS 84",6378137,298.257223563, # AUTHORITY["EPSG","7030"]], # AUTHORITY["EPSG","6326"]], # PRIMEM["Greenwich",0, # AUTHORITY["EPSG","8901"]], # UNIT["degree",0.0174532925199433, # AUTHORITY["EPSG","9122"]], # AUTHORITY["EPSG","4326"]] # FID Column = fid # Geometry Column = geom # type: String (15.0) # scalerank: Integer (0.0) # featurecla: String (50.0) .ft P .fi .UNINDENT .UNINDENT .sp Example using an attribute query is used to restrict the output of the features in a layer: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ogrinfo \-ro \e \-where \(aqGLOBAL_LINK_ID=185878\(aq \e wrk/SHETLAND_ISLANDS.NTF BL2000_LINK # INFO: Open of \(gawrk/SHETLAND_ISLANDS.NTF\(aq # using driver \(gaUK .NTF\(aq successful. # # Layer name: BL2000_LINK # Geometry: Line String # Feature Count: 1 # Extent: (419794.100000, 1069031.000000) \- (419927.900000, 1069153.500000) # Layer SRS WKT: # PROJCS["OSGB 1936 / British National Grid", # GEOGCS["OSGB 1936", # DATUM["OSGB_1936", # SPHEROID["Airy 1830",6377563.396,299.3249646]], # PRIMEM["Greenwich",0], # UNIT["degree",0.0174532925199433]], # PROJECTION["Transverse_Mercator"], # PARAMETER["latitude_of_origin",49], # PARAMETER["central_meridian",\-2], # PARAMETER["scale_factor",0.999601272], # PARAMETER["false_easting",400000], # PARAMETER["false_northing",\-100000], # UNIT["metre",1]] # LINE_ID: Integer (6.0) # GEOM_ID: Integer (6.0) # FEAT_CODE: String (4.0) # GLOBAL_LINK_ID: Integer (10.0) # TILE_REF: String (10.0) # OGRFeature(BL2000_LINK):2 # LINE_ID (Integer) = 2 # GEOM_ID (Integer) = 2 # FEAT_CODE (String) = (null) # GLOBAL_LINK_ID (Integer) = 185878 # TILE_REF (String) = SHETLAND I # LINESTRING (419832.100 1069046.300,419820.100 1069043.800,419808.300 # 1069048.800,419805.100 1069046.000,419805.000 1069040.600,419809.400 # 1069037.400,419827.400 1069035.600,419842 1069031,419859.000 # 1069032.800,419879.500 1069049.500,419886.700 1069061.400,419890.100 # 1069070.500,419890.900 1069081.800,419896.500 1069086.800,419898.400 # 1069092.900,419896.700 1069094.800,419892.500 1069094.300,419878.100 # 1069085.600,419875.400 1069087.300,419875.100 1069091.100,419872.200 # 1069094.600,419890.400 1069106.400,419907.600 1069112.800,419924.600 # 1069133.800,419927.900 1069146.300,419927.600 1069152.400,419922.600 # 1069153.500,419917.100 1069153.500,419911.500 1069153.000,419908.700 # 1069152.500,419903.400 1069150.800,419898.800 1069149.400,419894.800 # 1069149.300,419890.700 1069149.400,419890.600 1069149.400,419880.800 # 1069149.800,419876.900 1069148.900,419873.100 1069147.500,419870.200 # 1069146.400,419862.100 1069143.000,419860 1069142,419854.900 # 1069138.600,419850 1069135,419848.800 1069134.100,419843 # 1069130,419836.200 1069127.600,419824.600 1069123.800,419820.200 # 1069126.900,419815.500 1069126.900,419808.200 1069116.500,419798.700 # 1069117.600,419794.100 1069115.100,419796.300 1069109.100,419801.800 # 1069106.800,419805.000 1069107.300) .ft P .fi .UNINDENT .UNINDENT .SH AUTHOR Frank Warmerdam , Silke Reimer .SH COPYRIGHT 1998-2021 .\" Generated by docutils manpage writer. .