[GRASS-user] grass-user Digest, Vol 152, Issue 4
Micha Silver
tsvibar at gmail.com
Sat Dec 8 23:57:09 PST 2018
I'd like to point out that the combination of d.title and d.text is not
working also on my system. I don't use the d.* modules much any more,
but after seeing the OP's repeated posts, I decided to try.
I'm using Linux Mint, and here's what I did:
GRASS 7.4.0 (WGS84):~ > g.list rast
....
srtm_negev_3arc
....
GRASS 7.4.0 (WGS84):~ > g.region rast=srtm_negev_3arc
GRASS 7.4.0 (WGS84):~ > d.mon wx0 # empty
monitor appears
GRASS 7.4.0 (WGS84):~ > d.rast srtm_negev_3arc # map
displays OK
100%
# Now I try to add a title:
GRASS 7.4.0 (WGS84):~ > d.title -d map=srtm_negev_3arc color=red #
-d flag should display on wx0, but...
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)
# The tmp file is indeed missing:
GRASS 7.4.0 (WGS84):~ > ll /home/micha/GIS/grass/WGS84/PERMANENT/.tmp/TP480/
total 12
drwxr-xr-x 3 micha micha 4096 Dec 7 13:21 .
drwxr-xr-x 3 micha micha 4096 Dec 7 13:19 ..
-rw-r--r-- 1 micha micha 0 Dec 7 13:40 11143.0.leg
drwxr-xr-x 3 micha micha 4096 Dec 7 13:20 MONITORS
# Another try
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 title appears
# How about text without d.title
GRASS 7.4.0 (WGS84):~ > d.text text="My Title" color=red at=5,5
# Now text appears as expected!
GRASS 7.4.0 (WGS84):~ > echo "Second title" >> my_title.txt
GRASS 7.4.0 (WGS84):~ > d.text input=my_title.txt color=red at=25,25
# Again text appears
# And d.title piped into a file also works:
GRASS 7.4.0 (WGS84):~ > d.title map=srtm_negev_3arc > my_title2.txt
GRASS 7.4.0 (WGS84):~ > cat my_title2.txt
.C black
.S 4.000000
LOCATION: WGS84
srtm_negev_3arc in PERMANENT
North: 32.00 South: 29.00
West: 33.00 East: 36.00
Resolution: n-s: 0.00 e-w: 0.00
GRASS 7.4.0 (WGS84):~ > d.text input=my_title2.txt color=red at=75,75
# Text appears as expected
So maybe something is missing/not working in d.title | d.text combination ??
Regards, Micha
On 12/7/18 1:33 PM, Helmut Kudrnovsky wrote:
>> I just want to ask when i run the module d.title it does shown the title
>> So why the d.title does not work
> relevant part taken from the manual:
>
> -------
> Output created by d.title can be redirected into a file, or piped directly
> into d.text to display the map TITLE created by d.title.
> -------
>
> have you tried d.title + d.text?
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from:http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
On 12/7/18 9:16 AM, Helmut Kudrnovsky wrote:
>> Opearting system=eindows 8.1
>> Grass gis version = 7.4
>> Command typed in cmd=
>> d.mon wx0
>> d.title map=soils color=red size=6 -s
>> Then no tiles appear
>> Why the module is not working
> have you read the manual?
>
> https://grass.osgeo.org/grass74/manuals/d.title.html
>
> ------------
> d.title generates to standard output a string which can be used by d.text to
> draw a TITLE for the raster map layer name in the active display frame on
> the graphics monitor. Output created by d.title can be redirected into a
> file, or piped directly into d.text to display the map TITLE created by
> d.title. The map TITLE created will include the map layer's name, TITLE,
> MAPSET, LOCATION_NAME, geographic region boundary coordinates, and cell
> resolution. If the -d draw flag is used, then d.title will call d.text for
> you and the title will be automatically rendered to the display.
> [...]
> For example, a user wishing to create a suitable TITLE for the Spearfish, SD
> soils map layer and to display this TITLE in the active display frame on the
> graphics monitor might type the following:
>
> d.title map=soils color=red size=5 > TITLE.file
> d.text < TITLE.file
>
> Alternately, the user might pipe d.title output directly into d.text:
>
> d.title map=soils color=red size=5 | d.text
>
> A file created by d.title can be displayed with d.text. Information
> contained in this file takes precedence over the color and size parameters
> for d.text.
> ------------
>
> you need to use d.title in connection with d.text, e.g. on the OSGeo4W cmd
> line
>
> d.mon start=wx1
> d.rast map=elevation
>
> d.title -d map=elevation color=red size=5
> or
> d.title map=elevation color=red size=5 | d.text
>
> d.mon stop=wx1
>
>
>
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
More information about the grass-user
mailing list