Opened 6 years ago
Last modified 6 years ago
#3721 new defect
d.title with d.text does not insert title
Reported by: | micha | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Display | Version: | 7.4.0 |
Keywords: | title map display | Cc: | |
CPU: | Unspecified | Platform: | Linux |
Description
When using d.title combined directly with d.text, no title appears on the map display. The d.title flag -d does not create the tmp file with title text, and piping the output of d.title into d.text does not create any title.
i.e.:
GRASS 7.4.0 (WGS84):~ > d.title -d map=srtm_negev_3arc color=red # GRASS 7.4.0 (WGS84):~ > ERROR: Failed to run command 'd.text input=/home/micha/GIS/grass/WGS84/PERMANENT/.tmp/TP480/11266.0 at=50,50'. Details: GRASS_INFO_ERROR(11330,1): Unable to open input file </home/micha/GIS/grass/WGS84/PERMANENT/.tmp/TP480/11266.0> GRASS_INFO_END(11330,1)
or
GRASS 7.4.0 (WGS84):~ > d.title map=srtm_negev_3arc color=red size=10 | d.text align=cc GRASS 7.4.0 (WGS84):~ > # No error but NO title appears
The only option that works is to redirect d.title into a text file, then run d.text:
GRASS 7.4.0 (WGS84):~ > d.title map=srtm_negev_3arc > my_title2.txt GRASS 7.4.0 (WGS84):~ > d.text input=my_title2.txt color=red at=75,75 # Text appears as expected
Change History (7)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
No difference on my setup. Using input=-
does not give any error, but No title on the map display.
What works is redirecting d.title
into a text file, then pointing to that file with d.text input=...
comment:3 by , 6 years ago
There are two problems:
- d.title spawns d.text, but its input file gets deleted. d.text only creates a temp file for input=-, but not when a file is given. Please check r73883.
- d.text input=- doesn't work. Looking into it.
comment:4 by , 6 years ago
One more problem:
d.mon start=wx0 d.text input=file
in one directory and change to another directory that has a different "file" and run
d.text input=file
The monitor always picks up the file in the same directory where it got started.
I think this problem is GRASS_RENDER_IMMEDIATE vs. delegated rendering by render.py, but display modules should not care which renderer is being used.
comment:5 by , 6 years ago
For d.text input=-, please check r73884.
The last problem can be fixed by always creating a temporary file just like for stdin, but other display modules may have the same issue.
Can you try
? I'm on mobile and cannot test at time