OGRINFO(1) GDAL OGRINFO(1) (NAME) ogrinfo - OGR (SYNOPSIS) Usage: ogrinfo [--help] [--long-usage] [--help-general] [-json] [-ro] [-update] [--quiet] [-fid ] [-spat ] [-geomfield ] [-where ] [[-sql ]|[-rl]] [-dialect ] [-al] [[-summary]|[-features]] [-limit ] [-fields YES|NO] [-geom YES|NO|SUMMARY|WKT|ISO_WKT] [-oo ]... [-nomd] [-listmdd] [-mdd ]... [-nocount] [-noextent] [-extent3D] [-nogeomtype] [-wkt_format WKT1|WKT2|WKT2_2015|WKT2_2019] [-fielddomain ] [-if ]... filename []... (DESCRIPTION) ogrinfo OGR () . SQL . : "gdal": gdal vector info . (OPTIONS) --help . --help-general GDAL . -if / ( ) . . . . 3.2. -json JSON ogrinfo_output.schema.json. 3.7. -ro (read-only). -al ( ). (features) -so . JSON -al -features . -rl . ( OSM GMLAS) . -rl -sql . -so (Summary Only): (schema) (extents). JSON -so -features . -features . -so . GDALVectorInfo() / -json ogrinfo . RAM . 3.7. -limit 3.9. . -q : . -where (attribute query) WHERE SQL. . @ . -where : -where "\"Corner Point Identifier\" LIKE '%__00_00'" : -dialect -where . -dialect -where -sql . -sql |@ SQL . @ ( @my_select.txt my_select.txt ). INSERT UPDATE DELETE DROP TABLE ALTER TABLE SQL . (dialect) -dialect . -dialect SQL. OGRSQL SQL RDBMS OGR SQL () . SQLite SQL SQLITE INDIRECT_SQLITE . : -dialect -where . -dialect -where -sql . -spat . . -geomfield . -fid (feature id) . . : 'fid' OGR SQL . -where "fid in (1,3,5)" . -fields=YES|NO NO . YES . -fielddomain 3.3. (field domain). -geom=YES|NO|SUMMARY|WKT|ISO_WKT NO . SUMMARY . YES ISO_WKT OGC WKT . WKT WKT . YES . -oo = ( ). OGR_SCHEMA ( ) . JSON JSON OGR_SCHEMA . -nomd (). . -listmdd . -mdd . all . -nocount . -noextent . -extent3D 3.9. (3D) ( 2D ). . -nogeomtype . 3.1. --formats GDAL ( /) . : o ro o rw ( GDALDriver::CreateCopy() ) o rw+ ( GDALDriver::Create() ) o v / (/vsimem /vsigzip /vsizip ) . o s . . . -if ( ) . . GDAL_SKIP . -wkt_format WKT SRS ( ). format : WKT1 WKT2 ( WKT WKT2_2018) WKT2_2015 WKT2_2018 3.0.0. . . OGR Vector Formats . . ogrinfo ( ) . ( ) . . OGC WKT . (RETURN STATUS CODE) 0 ( ). (C API) C GDALVectorInfo() . 3.7. (EXAMPLES) : NTF $ ogrinfo wrk/SHETLAND_ISLANDS.NTF INFO: Open of `wrk/SHETLAND_ISLANDS.NTF' using driver `UK .NTF' successful. 1: BL2000_LINK (Line String) 2: BL2000_POLY (None) 3: BL2000_COLLECTIONS (None) 4: FEATURE_CLASSES (None) : (-so) $ ogrinfo \ -so \ natural_earth_vector.gpkg \ ne_10m_admin_0_antarctic_claim_limit_lines INFO: Open of `natural_earth_vector.gpkg' using driver `GPKG' 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) : JSON ogrinfo -json poly.shp { "description":"autotest/ogr/data/poly.shp", "driverShortName":"ESRI Shapefile", "driverLongName":"ESRI Shapefile", "layers":[ { "name":"poly", "metadata":{ "":{ "DBF_DATE_LAST_UPDATE":"2018-08-02" }, "SHAPEFILE":{ "SOURCE_ENCODING":"" } }, "geometryFields":[ { "name":"", "type":"Polygon", "nullable":true, "extent":[ 478315.53125, 4762880.5, 481645.3125, 4765610.5 ], "coordinateSystem":{ "wkt":"PROJCRS[\"OSGB36 / British National Grid\",BASEGEOGCRS[\"OSGB36\",DATUM...", "projjson":{ "$schema":"https://proj.org/schemas/v0.6/projjson.schema.json", "type":"ProjectedCRS", "name":"OSGB36 / British National Grid", "base_crs":{ "name":"OSGB36", "datum":{ "type":"GeodeticReferenceFrame", "name":"Ordnance Survey of Great Britain 1936", "ellipsoid":{ "name":"Airy 1830", "semi_major_axis":6377563.396, "inverse_flattening":299.3249646 } }, "coordinate_system":{ "subtype":"ellipsoidal", "axis":[ { "name":"Geodetic latitude", "abbreviation":"Lat", "direction":"north", "unit":"degree" }, { "name":"Geodetic longitude", "abbreviation":"Lon", "direction":"east", "unit":"degree" } ] }, "id":{ "authority":"EPSG", "code":4277 } }, "conversion":{ "name":"British National Grid", "method":{ "name":"Transverse Mercator", "id":{ "authority":"EPSG", "code":9807 } }, "parameters":[ { "name":"Latitude of natural origin", "value":49, "unit":"degree", "id":{ "authority":"EPSG", "code":8801 } }, { "name":"Longitude of natural origin", "value":-2, "unit":"degree", "id":{ "authority":"EPSG", "code":8802 } }, { "name":"Scale factor at natural origin", "value":0.9996012717, "unit":"unity", "id":{ "authority":"EPSG", "code":8805 } }, { "name":"False easting", "value":400000, "unit":"metre", "id":{ "authority":"EPSG", "code":8806 } }, { "name":"False northing", "value":-100000, "unit":"metre", "id":{ "authority":"EPSG", "code":8807 } } ] }, "coordinate_system":{ "subtype":"Cartesian", "axis":[ { "name":"Easting", "abbreviation":"E", "direction":"east", "unit":"metre" }, { "name":"Northing", "abbreviation":"N", "direction":"north", "unit":"metre" } ] }, "scope":"Engineering survey, topographic mapping.", "area":"United Kingdom (UK) - offshore to boundary of UKCS within 4945...", "bbox":{ "south_latitude":49.75, "west_longitude":-9, "north_latitude":61.01, "east_longitude":2.01 }, "id":{ "authority":"EPSG", "code":27700 } }, "dataAxisToSRSAxisMapping":[ 1, 2 ] } } ], "featureCount":10, "fields":[ { "name":"AREA", "type":"Real", "width":12, "precision":3, "nullable":true, "uniqueConstraint":false }, { "name":"EAS_ID", "type":"Integer64", "width":11, "nullable":true, "uniqueConstraint":false }, { "name":"PRFEDEA", "type":"String", "width":16, "nullable":true, "uniqueConstraint":false } ] } ], "metadata":{ }, "domains":{ }, "relationships":{ } } : -q $ ogrinfo -q -ro \ -where 'GLOBAL_LINK_ID=185878' \ wrk/SHETLAND_ISLANDS.NTF BL2000_LINK Layer name: BL2000_LINK 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,... : Shapefile SQL SQLite ogrinfo test.shp -dialect sqlite -sql "update test set attr='bar' where attr='foo'" : ogrinfo input.shp -sql "ALTER TABLE input ADD fieldX float" : SQL . :memory: SQLite ( SQLite SQL ). ogrinfo :memory: -sql "SELECT ST_Buffer(ST_GeomFromText('POINT(0 0)'), 1)" (AUTHORS) Frank Warmerdam , Silke Reimer (COPYRIGHT) 1998-2026 August 18, 2026 OGRINFO(1)