[Feat] Improve JSON in v.to.db
Is your feature request related to a problem? Please describe. There are couple things to address in the current JSON schema, mainly consistency.
- [ ] The key "unit", should be renamed to "units" and should look like totals:
"units": {
"length": "kilometers"
},
"totals": {
"length": 38.839528111915129
},
This will be more consistent and in the future if we decide to implement printing multiple geometry attributes, the units could be different for each attribute.
-
[ ] Also, totals and units should appear everytime, but if it does not apply, it should be empty {}.
-
[ ] update tests
-
[ ] add example to documentation, a simple Python one showing the JSON output
Has this already been addressed in https://github.com/OSGeo/grass/pull/4036, or is there something else that still needs updating?
I somehow forgot this was implemented, I reviewed the implementation and changed the PR description.