planetlabs / gpq

Utility for working with GeoParquet
https://planetlabs.github.io/gpq/
Apache License 2.0
144 stars 8 forks source link

Additional information in describe output #39

Closed tschaub closed 1 year ago

tschaub commented 1 year ago

This adds additional information to the describe output:

The edges, orientation, and crs per geometry column is summarized in a "detail" column in the text output. Number of rows and version are shown in the table footer. The primary geometry column name is shown in bold.

# gpq describe internal/testdata/cases/example-v1.0.0-beta.1.parquet
╭────────────┬──────────────┬────────────┬────────────┬──────────┬───────────────────────┬───────────────────────────┬──────────────────────────╮
│ COLUMN     │ TYPE         │ ANNOTATION │ REPETITION │ ENCODING │ GEOMETRY TYPES        │ BOUNDS                    │ DETAIL                   │
├────────────┼──────────────┼────────────┼────────────┼──────────┼───────────────────────┼───────────────────────────┼──────────────────────────┤
│ pop_est    │ int64        │            │ 0..1       │          │                       │                           │                          │
│ continent  │ binary       │ STRING     │ 0..1       │          │                       │                           │                          │
│ name       │ binary       │ STRING     │ 0..1       │          │                       │                           │                          │
│ iso_a3     │ binary       │ STRING     │ 0..1       │          │                       │                           │                          │
│ gdp_md_est │ double       │            │ 0..1       │          │                       │                           │                          │
│ geometry   │ binary       │            │ 0..1       │ WKB      │ Polygon, MultiPolygon │ [-180, -90, 180, 83.6451] │  edges │ planar          │
│            │              │            │            │          │                       │                           │  crs   │ WGS 84 (CRS84)  │
├────────────┼──────────────┼────────────┴────────────┴──────────┴───────────────────────┴───────────────────────────┴──────────────────────────┤
│ ROWS       │ 5            │                                                                                                                   │
│ VERSION    │ 1.0.0-BETA.1 │                                                                                                                   │
╰────────────┴──────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯