#2595: Extend r.out.file to PNG/PS monitors
---------------------------------------+------------------------------------
Reporter: gisix | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1.0
Component: Display | Version: unspecified
Keywords: r.out.file, d.save, d.mon | Platform: Unspecified
Cpu: Unspecified |
---------------------------------------+------------------------------------
Comment(by gisix):
Intended workflow (Pseudocode):
----
1) The user provides custom mapping information as a d.save output file
"FOO" (raster,vector,annotations,lettering,whatever)
2) The content of FOO is exported as the geotiff "BAZ" [conveniently
provided via an extended r.out.file module..]
3) BAZ can be used by other software (like GMT)
----
Current ugly bash script. Works with GRASS 6.4.4. Code has not been
implemented for GRASS 7.x
###########################################
# Start dummy-monitor to recreate user-sided monitor content
# TBD: Why does d.out.file not cooperate with a PNG monitor ?
d.mon start=x7
d.mon select=x7
###########################################
# Execute user-provided monitor content in x7
sh ./$GRASS_MONITOR_DSAVE_FILE
###########################################
# Failsafe: Remove precautiously d.out.file output as the script doesn't
allow --o overwrite.
rm ${OUTPUT_FILE}
###########################################
# Write out monitor content as Geotiff:
d.out.file output=${OUTPUT_FILE} format=geotiff resolution=1
size=$MONITOR_WIDTH,$MONITOR_HEIGHT
##########################################
# Terminate monitor d.mon stop=x7
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2595#comment:7>
GRASS GIS <http://grass.osgeo.org>