LinuxCommandLibrary

ogrinfo

displays vector data information

TLDR

Show file info

$ ogrinfo [file.shp]
copy
Show layer summary
$ ogrinfo -so [file.shp] [layer_name]
copy
List all layers
$ ogrinfo -al [file.shp]
copy
Show specific feature
$ ogrinfo [file.shp] -fid [feature_id]
copy
Query with SQL
$ ogrinfo [file.shp] -sql "[SELECT * FROM layer]"
copy

SYNOPSIS

ogrinfo [options] datasource [layer]

DESCRIPTION

ogrinfo displays vector data information. Shows layers, fields, and features.
The tool inspects geospatial files. Part of GDAL suite.

PARAMETERS

DATASOURCE

Vector data source.
LAYER
Layer name.
-so
Summary only.
-al
All layers.
-fid ID
Feature ID.
-sql QUERY
SQL query.
--help
Display help information.

CAVEATS

Part of GDAL. Format support varies. Large files may be slow.

HISTORY

ogrinfo is part of GDAL/OGR library for geospatial data inspection.

SEE ALSO

ogr2ogr(1), gdalinfo(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community