snippetbashTip
ogrinfo — List information about an OGR-supported data source. More information: <https://gdal.org/en/stable/p
Viewed 0 times
ogrinfocommandogrsupportedcliinformationaboutlist
Problem
How to use the
ogrinfo command: List information about an OGR-supported data source. More information: <https://gdal.org/en/stable/programs/ogrinfo.html>.Solution
ogrinfo — List information about an OGR-supported data source. More information: <https://gdal.org/en/stable/programs/ogrinfo.html>.List supported formats:
ogrinfo --formatsList layers of a data source:
ogrinfo {{path/to/input.gpkg}}Get detailed information about a specific layer of a data source:
ogrinfo {{path/to/input.gpkg}} {{layer_name}}Show summary information about a specific layer of a data source:
ogrinfo -so {{path/to/input.gpkg}} {{layer_name}}Show summary of all layers of the data source:
ogrinfo -so -al {{path/to/input.gpkg}}Show detailed information of features matching a condition:
ogrinfo -where '{{attribute_name > 42}}' {{path/to/input.gpkg}} {{layer_name}}Update a layer in the data source with SQL:
ogrinfo {{path/to/input.geojson}} -dialect SQLite -sql "{{UPDATE input SET attribute_name = 'foo'}}"Code Snippets
List supported formats
ogrinfo --formatsList layers of a data source
ogrinfo {{path/to/input.gpkg}}Get detailed information about a specific layer of a data source
ogrinfo {{path/to/input.gpkg}} {{layer_name}}Show summary information about a specific layer of a data source
ogrinfo -so {{path/to/input.gpkg}} {{layer_name}}Show summary of all layers of the data source
ogrinfo -so -al {{path/to/input.gpkg}}Context
tldr-pages: common/ogrinfo
Revisions (0)
No revisions yet.