Opened 10 years ago
Closed 7 years ago
#2595 closed enhancement (invalid)
Extend r.out.file to PNG/PS monitors
Reported by: | gisix | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.4.1 |
Component: | Display | Version: | unspecified |
Keywords: | r.out.file, d.save, d.mon | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Currently r.out.file only works for active X-monitors. Please extend for PNG/PS/etc monitors. This will enable the use in automated scripts and on systems without an X-Server.
Change History (13)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Component: | Default → Display |
---|---|
Keywords: | r.out.file added |
comment:3 by , 10 years ago
Replying to gisix:
Currently r.out.file only works for active X-monitors. Please extend for PNG/PS/etc monitors. This will enable the use in automated scripts and on systems without an X-Server.
btw, you don't need r.out.file
for that. Using d.mon
is enough, eg.
d.mon cairo out=/tmp/elev.png d.rast elevation d.mon -r
comment:4 by , 10 years ago
The issue was first noticed in GRASS6.4.x, so apologies for the reference to x0 etc. There was an earlier discussion on the user list about this:
On Wed, Nov 12, 2014 at 4:13 AM, Glynn Clements <glynn at gclements.plus.com> wrote:
César Augusto Ramírez Franco wrote:
As far as I understand, d.out.file only works with X monitors,
This appears to be the case, although I have no idea why.
The basic operation of d.out.file is to run "d.save" to extract the list of commands used to generate the display, then replay those commands on a PNG/PS/cairo monitor.
The functionality on which d.save relies isn't specific to a particular driver.
-- Glynn Clements <glynn at gclements.plus.com>
It would be great if this could be fixed both in 6.4.5 and 7.0.1.
comment:6 by , 10 years ago
Keywords: | d.save d.mon added |
---|---|
Milestone: | 7.0.1 → 7.1.0 |
Please, share the exact workflow and commands you are using or wish to use, so it is clear what you miss and what is your use case (which current system does not cover). Also, please test your workflow in both 6.4 and 7.0 and be specific about what works and what does not work in each of them. Ideally provide a simple shell script (minimal working example) which shows the requested functionality.
This looks like a feature which should be implemented for next version, so changing milestone.
comment:7 by , 10 years ago
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
comment:10 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:11 by , 7 years ago
Milestone: | 7.2.2 → 7.4.0 |
---|
All enhancement tickets should be assigned to 7.4 milestone.
Replying to gisix:
There are no X-monitors in GRASS 7. Are you referring to wx0 (wxGUI) monitors?