Skip to content

Commit

Permalink
r.info: Add JSON output (OSGeo#3744)
Browse files Browse the repository at this point in the history
Uses parson to add JSON output format support to the r.info module. The tool has various flags to control the fields being output in case of the shell script style format (aka plain in the code). The JSON output always contains all fields even without the flags being specified, except for statistics. The statistics must be set with a flag because the statistics are only optionally stored in the raster data and computing them on the fly takes a lot of time.

The option value for format is plain (shell/key-value) and json and internally, the plain, human output is treated separately from the machine readable formats which are PLAIN and JSON.
  • Loading branch information
kritibirda26 authored and a0x8o committed Jun 17, 2024
1 parent 078ff8f commit 59c95cc
Show file tree
Hide file tree
Showing 4 changed files with 458 additions and 87 deletions.
2 changes: 1 addition & 1 deletion raster/r.info/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MODULE_TOPDIR = ../..

PGM = r.info

LIBES = $(RASTERLIB) $(GISLIB)
LIBES = $(RASTERLIB) $(GISLIB) $(PARSONLIB)
DEPENDENCIES = $(RASTERDEP) $(GISDEP)

include $(MODULE_TOPDIR)/include/Make/Module.make
Expand Down
Loading

0 comments on commit 59c95cc

Please sign in to comment.