ogrinfo
Ogrinfo is a command-line tool that is part of the GDAL (Geospatial Data Abstraction Library) package. It allows users to easily query and retrieve information about a wide variety of geospatial data formats, including vector data formats such as shapefiles, GeoJSON, and Geodatabases. By running ogrinfo, one can obtain detailed information about the structure, attributes, and metadata of a dataset, such as the number of features, attribute names and types, spatial extent, and coordinate system information. The tool supports both reading and writing operations, allowing users to perform data conversions, filtering, and other spatial operations based on the information retrieved. Ogrinfo can also be used to perform spatial and attribute queries, allowing users to select features based on specific criteria. It supports several output formats, including tabular formats like CSV and SQL databases, enabling users to analyze and further process the retrieved information. The tool is highly flexible and customizable, with a wide range of options and command-line parameters to control the output format, verbosity, and data source options. Ogrinfo is widely used by GIS professionals and developers to quickly inspect and analyze geospatial datasets without the need for complex programming. It is incorporated into many GIS software packages and can be automated through scripting to perform batch operations and data processing tasks. As part of the GDAL toolset, ogrinfo benefits from continuous updates and improvements, ensuring compatibility with various geospatial data formats and evolving industry standards.
List of commands for ogrinfo:
-
ogrinfo:tldr:01c95 ogrinfo: Show summary of all layers of the data source.$ ogrinfo -so -al ${path-to-input-gpkg}try on your machineexplain this command
-
ogrinfo:tldr:36cf6 ogrinfo: List layers of a data source.$ ogrinfo ${path-to-input-gpkg}try on your machineexplain this command
-
ogrinfo:tldr:3c472 ogrinfo: Show summary information about a specific layer of a data source.$ ogrinfo -so ${path-to-input-gpkg} ${layer_name}try on your machineexplain this command
-
ogrinfo:tldr:40bae ogrinfo: Get detailed information about a specific layer of a data source.$ ogrinfo ${path-to-input-gpkg} ${layer_name}try on your machineexplain this command
-
ogrinfo:tldr:5e185 ogrinfo: Update a layer in the data source with SQL.$ ogrinfo ${path-to-input-geojson} -dialect SQLite -sql "${UPDATE input SET attribute_name = 'foo'}"try on your machineexplain this command
-
ogrinfo:tldr:80191 ogrinfo: Show detailed information of features matching a condition.$ ogrinfo -where '${attribute_name > 42}' ${path-to-input-gpkg} ${layer_name}try on your machineexplain this command
-
ogrinfo:tldr:f806e ogrinfo: List supported formats.$ ogrinfo --formatstry on your machineexplain this command