Comments (3)
See #3020 for tracking modules that need JSON/YAML output.
from grass.
Random ideas
- Adding a new standard option (e.g.,
G_OPT_M_FORMAT
) - Implementing a new library function for format translations (e.g.,
G_translate_format()
) - Maybe, some more utility functions to generate JSON objects (would this format be the most complex and expressible format for GRASS?)
- Individual modules only generate JSON outputs (the superset of all formats) and use
G_translate_format()
to produce other formats
from grass.
A lot of tools need key value format, so some universal translating function would work. Another group might be table data. Some tools would have to keep their own formats at least if we want to stay compatible. The human readable output is also important. YAML can sometimes count like that.
What is funny is that GRASS GIS is using basically YAML files since 80s to store things internally. Internal WIND file looks like this:
proj: 99
zone: 0
north: 221230
south: 219580
east: 639530
west: 637740
cols: 179
rows: 165
e-w resol: 10
n-s resol: 10
top: 1
bottom: 0
cols3: 179
rows3: 165
depths: 1
e-w resol3: 10
n-s resol3: 10
t-b resol: 1
But for machine readable output, it gets translated to:
projection=99
zone=0
n=221230
s=219580
w=637740
e=639530
nsres=10
ewres=10
rows=165
cols=179
cells=29535
which was designed for Bash eval and similar usage, but these days most people would likely choose JSON or YAML as sort of the default machine readable format for this data. Same for raster cellhd and vector head files and what r.info and v.info produce.
__________________
/ GRASS GIS \
\ is yamly! /
-------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
_\|/__\|/__\|/_ || || _\|/__\|/_
from grass.
Related Issues (20)
- [Bug] CI on main failing due to dependencies HOT 4
- Grass GIS version 8.3.2.1 problem HOT 8
- [Bug] CI: Bandit: 1 configuration not found (python-code-quality.yml) HOT 3
- [Bug] PATH setting discrepancy between the main exectable and Python API for scripts on Windows
- [Bug] wxGUI: Nonsense commands end in Success in gconsole OnCmdDone method
- [Bug] Windows CI builds fail to compile r.flow HOT 6
- Renovate naming convention issue HOT 2
- Raster layers cannot be displayed[Bug] HOT 1
- [Bug] wxGUI/history: update cross to green check after updating to current region
- Tests are failing in CI with an ISO format error HOT 6
- r.recode results in integer when floating numbers are expected [Bug] HOT 6
- [Bug] Windows GUI can't launch for 8.4.0dev (nightly) HOT 7
- [Build] Exclude specific module (r.geomorphon) at compilation HOT 17
- [Feat] temporal: revert #3723 (fix for SQLite version < 3.33)
- [Bug] [Windows] Crash of the GRASS-GIS 8.3 `v.surf.rst.exe` (OSGeo4W) and Windows module `ntdll.dll` HOT 14
- [Bug] Windows 8.4.0dev cannot launch GUI with error in `gui\wxpython\lmgr\statusbar.py` HOT 12
- [Bug] Windows OSGeo4W builds seem to report outdated build info HOT 2
- import nc file in grass gis HOT 2
- [Feat] library: Add Standard parser options for date and time HOT 1
- [Feat] i.group: print image group content with semantic_labels in JSON HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grass.