Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] [whitebox-workflows] - add raster/vector simple info() to show metadata #426

Open
CarlosGrohmann opened this issue Aug 21, 2024 · 0 comments

Comments

@CarlosGrohmann
Copy link

One useful feature would be a "info()" method that would output a common set of properties for raster and vector objects.
For example, GRASS has r.info and v.info. The outputs can be formatted for printing on the terminal or shell script-style. Here are examples (terminal print):

Raster info

 +----------------------------------------------------------------------------+
 | Map:      copdem30_casiquiare_fps_fs5_n  Date: Wed Aug 21 16:18:24 2024    |
 | Mapset:   cass                           Login of Creator: guano           |
 | Project:  latlong                                                          |
 | DataBase: /mnt/sda3/grassdata                                              |
 | Title:    copdem30_casiquiare_fps_fs5_ndt5_it2                             |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    FCELL                Semantic label: (none)                |
 |   Rows:         14401                                                      |
 |   Columns:      21601                                                      |
 |   Total Cells:  311076001                                                  |
 |        Projection: Latitude-Longitude                                      |
 |            N: 4:00:00.5N    S: 0:00:00.5S   Res: 0:00:01                   |
 |            E: 62:59:59.5W    W: 69:00:00.5W   Res: 0:00:01                 |
 |   Range of data:    min = 18.15279  max = 2935.733                         |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal -a -k input="/media/guano/data/casiquiare_wbw/copdem30_cas\   |
 |    iquiare_fps_fs5_ndt5_it2.tif" output="copdem30_casiquiare_fps_fs5_nd\   |
 |    t5_it2" memory=300 offset=0 num_digits=0                                |
 |                                                                            |
 +----------------------------------------------------------------------------+

Vector info

+----------------------------------------------------------------------------+
 | Name:            adm_america_sul                                           |
 | Mapset:          base_maps                                                 |
 | Project:         latlong                                                   |
 | Database:        /mnt/sda3/grassdata                                       |
 | Title:                                                                     |
 | Map scale:       1:1                                                       |
 | Name of creator:                                                           |
 | Organization:                                                              |
 | Source date:                                                               |
 | Timestamp (first layer): none                                              |
 |----------------------------------------------------------------------------|
 | Map format:      native                                                    |
 |----------------------------------------------------------------------------|
 |   Type of map: vector (level: 2)                                           |
 |                                                                            |
 |   Number of points:       0               Number of centroids:  0          |
 |   Number of lines:        4               Number of boundaries: 333        |
 |   Number of areas:        196             Number of islands:    182        |
 |                                                                            |
 |   Map is 3D:              No                                               |
 |   Number of dblinks:      1                                                |
 |                                                                            |
 |   Projection: Latitude-Longitude                                           |
 |                                                                            |
 |               N:  12:37:50.815332N    S:  55:54:09.313146S                 |
 |               E:  34:47:34.181493W    W:  91:40:21.951094W                 |
 |                                                                            |
 |   Digitization threshold: 0                                                |
 |   Comment:                                                                 |
 |                                                                            |
 +----------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant