1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/ogrinfo.md

33 lines
871 B
Markdown
Raw Normal View History

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