tldr/pages/common/ogrinfo.md

33 lines
871 B
Markdown
Raw Permalink Normal View History

2019-10-29 15:36:20 +00:00
# ogrinfo
> List information about an OGR-supported data source.
> More information: <https://gdal.org/programs/ogrinfo.html>.
2022-02-27 13:50:07 +00:00
- List supported formats:
2019-10-29 15:36:20 +00:00
2022-02-27 13:50:07 +00:00
`ogrinfo --formats`
2019-10-29 15:36:20 +00:00
2022-02-27 13:50:07 +00:00
- List layers of a data source:
2019-10-29 15:36:20 +00:00
2022-02-27 13:50:07 +00:00
`ogrinfo {{path/to/input.gpkg}}`
2019-10-29 15:36:20 +00:00
2022-02-27 13:50:07 +00:00
- Get detailed information about a specific layer of a data source:
2019-10-29 15:36:20 +00:00
2022-02-27 13:50:07 +00:00
`ogrinfo {{path/to/input.gpkg}} {{layer_name}}`
2022-03-19 18:16:51 +00:00
- Show summary information about a specific layer of a data source:
2022-02-27 13:50:07 +00:00
`ogrinfo -so {{path/to/input.gpkg}} {{layer_name}}`
2022-03-19 18:16:51 +00:00
- 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'}}"`