[GRASS-dev] Error in redrawing text layer in gis.m

I get an error in gis.m when trying to redraw the map canvas when I have a geogrid layer and a text layer both redrawing simultaneously.

Steps to reproduce, in Spearfish:

1. Add Geology, and Roads to gis.m. Set display region to Geology.
2. Add a Grid layer. Choose the following display options: Geodetic grid, black text and line color, turn border text off, set grid size to '00:05:00' (five arcminutes).
3. Add a text layer. Text to display was a label for the 103 45'W meridian, choose mouse placement, bold text, rotate -88 degrees. All other options set to default values.
4. Click 'Redraw all layers'.
5. Important: Turn the 'draw border text' option on the geogrid layer OFF.
4. Click 'Redraw all layers' on the map display window.

Error is produced; See attached a log file for details.

(attachments)

Text_layer_Error.log (1.53 KB)

Eric,

I tried to reproduce this but had no problems. However, there is something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic grid
(i.e., using DD:MM:SS) in a projected location.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Fri, 10 Nov 2006 10:22:23 -0500
To: <grass-dev@grass.itc.it>
Subject: [GRASS-dev] Error in redrawing text layer in gis.m

I get an error in gis.m when trying to redraw the map canvas when I have a
geogrid layer and a text layer both redrawing simultaneously.

Steps to reproduce, in Spearfish:

1. Add Geology, and Roads to gis.m. Set display region to Geology.
2. Add a Grid layer. Choose the following display options: Geodetic grid,
black text and line color, turn border text off, set grid size to '00:05:00'
(five arcminutes).
3. Add a text layer. Text to display was a label for the 103 45'W meridian,
choose mouse placement, bold text, rotate -88 degrees. All other options set
to default values.
4. Click 'Redraw all layers'.
5. Important: Turn the 'draw border text' option on the geogrid layer OFF.
4. Click 'Redraw all layers' on the map display window.

Error is produced; See attached a log file for details.

Patton, Eric wrote:

I get an error in gis.m when trying to redraw the map canvas when I
have a geogrid layer and a text layer both redrawing simultaneously.

Steps to reproduce, in Spearfish:

1. Add Geology, and Roads to gis.m. Set display region to Geology.
2. Add a Grid layer. Choose the following display options: Geodetic
grid, black text and line color, turn border text off, set grid size
to '00:05:00' (five arcminutes). 3. Add a text layer. Text to
display was a label for the 103 45'W meridian, choose mouse
placement, bold text, rotate -88 degrees. All other options set to
default values. 4. Click 'Redraw all layers'. 5. Important: Turn the
'draw border text' option on the geogrid layer OFF. 4. Click 'Redraw
all layers' on the map display window.

Error is produced; See attached a log file for details.

Hi,

Your setup leads to an error on my box, but to a different one:

invalid command name
".mainframe.frame.pw1.f1.frame.sw.sf.frame.fr.east_north.a"
invalid command name
".mainframe.frame.pw1.f1.frame.sw.sf.frame.fr.east_north.a"
    while executing
"$pctentry delete 0 end"
    invoked from within
"if { $pctentry != "" } {
      $pctentry delete 0 end
      $pctentry insert 0 "$xpct,$ypct"
      # object placement marker
      $mapdisp create line 479 [expr ..."
    (command bound to event)

Maciek

Michael,

I had no problems drawing a geogrid in a UTM location. Maciek also has an error when he steps through my report, although the exact error message differs. Strange. I won't be able to test this error further as I'm trying to recompile gdal.

~ Eric.

=====================================================================

Eric,

I tried to reproduce this but had no problems. However, there is
something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic
grid
(i.e., using DD:MM:SS) in a projected location.

Michael

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid box
(a flag in d.grid), it allows you to enter latlon coordinates into the grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode, not
geodesic mode.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Tue, 14 Nov 2006 10:15:55 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

I had no problems drawing a geogrid in a UTM location. Maciek also has an
error when he steps through my report, although the exact error message
differs. Strange. I won't be able to test this error further as I'm trying to
recompile gdal.

~ Eric.

=====================================================================

Eric,

I tried to reproduce this but had no problems. However, there is
something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic
grid
(i.e., using DD:MM:SS) in a projected location.

Michael

On Tue, 14 Nov 2006, Michael Barton wrote:

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid box
(a flag in d.grid), it allows you to enter latlon coordinates into the grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode, not
geodesic mode.

No, the geodetic grid option works in projected locations - in fact that's the whole point of it. I used it just the other day - see http://www.stjohnspoint.co.uk/gis/total-coverage.png for an example of what it looks like. This option is pointless in lat/long locations as the grid would be in lat/long co-ordinates anyway. In 6.3 there is another option, -w to draw the geodetic grid referenced to the WGS84 ellipsoid rather than the projected ellipsoid.

Paul

Michael,

That's odd...because gis.m correctly drew a lat-long graticule over my map window (I had a nautical chart displayed to check it against), so it was working correctly in a projected location. I only encountered an error during redraw as described in my original post.

~ Eric.

-----Original Message-----
From: Michael Barton
To: Patton, Eric; grass-dev@grass.itc.it
Cc: Maciej Sieczka
Sent: 11/14/2006 6:31 PM
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid
box
(a flag in d.grid), it allows you to enter latlon coordinates into the
grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode,
not
geodesic mode.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Tue, 14 Nov 2006 10:15:55 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

I had no problems drawing a geogrid in a UTM location. Maciek also has

an

error when he steps through my report, although the exact error

message

differs. Strange. I won't be able to test this error further as I'm

trying to

recompile gdal.

~ Eric.

=====================================================================

Eric,

I tried to reproduce this but had no problems. However, there is
something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic
grid
(i.e., using DD:MM:SS) in a projected location.

Michael

I couldn't get a latlon grid to work at all in a UTM location (spearfish).

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Wed, 15 Nov 2006 09:13:37 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: Maciej Sieczka <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

That's odd...because gis.m correctly drew a lat-long graticule over my map
window (I had a nautical chart displayed to check it against), so it was
working correctly in a projected location. I only encountered an error during
redraw as described in my original post.

~ Eric.

-----Original Message-----
From: Michael Barton
To: Patton, Eric; grass-dev@grass.itc.it
Cc: Maciej Sieczka
Sent: 11/14/2006 6:31 PM
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid
box
(a flag in d.grid), it allows you to enter latlon coordinates into the
grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode,
not
geodesic mode.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Tue, 14 Nov 2006 10:15:55 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

I had no problems drawing a geogrid in a UTM location. Maciek also has

an

error when he steps through my report, although the exact error

message

differs. Strange. I won't be able to test this error further as I'm

trying to

recompile gdal.

~ Eric.

=====================================================================

Eric,

I tried to reproduce this but had no problems. However, there is
something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic
grid
(i.e., using DD:MM:SS) in a projected location.

Michael

Hmmm.

I'll look some more. There is some kind of inconsistent behavior, but I'm
not sure what it is.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Paul Kelly <paul-grass@stjohnspoint.co.uk>
Date: Wed, 15 Nov 2006 08:55:43 +0000 (GMT)
To: Michael Barton <michael.barton@asu.edu>
Cc: "Patton, Eric" <epatton@nrcan.gc.ca>, <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

On Tue, 14 Nov 2006, Michael Barton wrote:

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid box
(a flag in d.grid), it allows you to enter latlon coordinates into the grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode, not
geodesic mode.

No, the geodetic grid option works in projected locations - in fact that's
the whole point of it. I used it just the other day - see
http://www.stjohnspoint.co.uk/gis/total-coverage.png for an example of
what it looks like. This option is pointless in lat/long locations as the
grid would be in lat/long co-ordinates anyway. In 6.3 there is another
option, -w to draw the geodetic grid referenced to the WGS84 ellipsoid
rather than the projected ellipsoid.

Paul

Eric,

I just tried the following in the Spearfish 6 dataset, with elevation_dem,
streams, and archsites displayed...

1. Added a grid layer on top of everything else
2. Set the grid options as follows:
    "draw grid" checked
    "geodetic grid" checked
    "grid & text color" default grey
    "grid size"=.01
    "grid origin"=-104,44
3. Press the "Display active layers" button (far left)
--the grid is drawn (I was wrong about it not working with a latlon grid; I
simply had incorrect values)
4. Press the "Display active layers" button again
--the grid is drawn
5. Press "Redraw all layers" button
--the grid is drawn
6. Press the "Redraw all layers" button
--the grid is drawn

I can't get an error to be generated if there are correct values for the
grid. Are you doing something that I am not doing here?

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Wed, 15 Nov 2006 09:13:37 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: Maciej Sieczka <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

That's odd...because gis.m correctly drew a lat-long graticule over my map
window (I had a nautical chart displayed to check it against), so it was
working correctly in a projected location. I only encountered an error during
redraw as described in my original post.

~ Eric.

-----Original Message-----
From: Michael Barton
To: Patton, Eric; grass-dev@grass.itc.it
Cc: Maciej Sieczka
Sent: 11/14/2006 6:31 PM
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

Eric,

I think the issue is with d.grid. In normal mode, you draw a geographic
(projected) grid in a projected location. If you check the geodesic grid
box
(a flag in d.grid), it allows you to enter latlon coordinates into the
grid
spacing parameters. BUT I think this only works in latlon locations.
Spearfish is a UTM location, so you need to use it in geographic mode,
not
geodesic mode.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Tue, 14 Nov 2006 10:15:55 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Cc: <tutey@o2.pl>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

Michael,

I had no problems drawing a geogrid in a UTM location. Maciek also has

an

error when he steps through my report, although the exact error

message

differs. Strange. I won't be able to test this error further as I'm

trying to

recompile gdal.

~ Eric.

=====================================================================

Eric,

I tried to reproduce this but had no problems. However, there is
something
curious about your report. The Spearfish dataset is in UTM and you are
talking about a grid in latlon. I wonder if you cannot draw a geodetic
grid
(i.e., using DD:MM:SS) in a projected location.

Michael

I can't get an error to be generated if there are correct values for the
grid. Are you doing something that I am not doing here?

Michael,

Yes, the critical step is to have a text layer drawn on the map canvas and geogrid as well. Try adding a lext layer, drawing, then changing parameters in the text layer options, like boldness, angle of rotation, etc. Then click 'Redraw all layers'. Or, try turning the text layer off, change parameters, redraw, then turn the text layer back on and redraw all layers. This not only produces an error, but freezes all display buttons in gis.m. I have to kill gis.m and start another instance of it to continue.

~ Eric.

OK. I'll add this step and see what is going on.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Wed, 15 Nov 2006 14:55:09 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

I can't get an error to be generated if there are correct values for the
grid. Are you doing something that I am not doing here?

Michael,

Yes, the critical step is to have a text layer drawn on the map canvas and
geogrid as well. Try adding a lext layer, drawing, then changing parameters in
the text layer options, like boldness, angle of rotation, etc. Then click
'Redraw all layers'. Or, try turning the text layer off, change parameters,
redraw, then turn the text layer back on and redraw all layers. This not only
produces an error, but freezes all display buttons in gis.m. I have to kill
gis.m and start another instance of it to continue.

~ Eric.

Patton, Eric wrote:

3. Add a text layer. Text to display was a label for the 103 45'W
meridian, choose mouse placement, bold text, rotate -88 degrees. All
other options set to default values.

how do you get to that tool? "PS txt" is the last button on the top row
of the GIS manager for me (6.2, 6.3).

I see in the help page it should be there:

"Add text layer
Adds layer to display a line of text using default GRASS font (selected
with d.font). Options include: text placement (screen coordinates); and
text size, bolding, and color. See d.text."

but no button for it. Am I blind?

?
Hamish

Michael Barton wrote:

I couldn't get a latlon grid to work at all in a UTM location
(spearfish).

make sure "draw grid" box is checked as well as "geodetic grid". (!)

I was wondering if "0:05" needed to be quoted, but it seems to work ok for
me. I did get it to lock up (100% cpu), but that was when I tried using
a standard grid with a resolution of 0.08333, which in UTM creates many
many grid lines which takes a minute or two to render. :slight_smile:

otherwise, no gis.m gridline problems at my end.

Eric: any reason you aren't letting d.grid label the lines for you?
It should be formatted and rotated nicely (e.g. 44:26N)
(i.e. is there something about that you think could be improved?)

Hamish

Eric,

I can't get it to fail. I don't doubt that it's failing for you, but I can't
get it to fail for me. I'm using the latest GUI with the new d.text.new
layer. I have a raster, vector line, and vector point layer; I added a grid
with a 0.02 degree spacing; then I added the text layer.

I changed the text layer options, turned it on and off, deleted it and tried
the PS Text layer, changed its options, turned it on and off, deleted the PS
Text layer and re-added a normal text layer, messed with options again,
turned it on and off again.

Nothing cause this to fail. It always drew the underlying maps, grid, and
text. I tried both stroke and x11 fonts in the text layer.

I'm using Spearfish to test this. Is there any other clue to the conditions
under which this fails?

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Wed, 15 Nov 2006 14:55:09 -0500
To: Michael Barton <michael.barton@asu.edu>, <grass-dev@grass.itc.it>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

I can't get an error to be generated if there are correct values for the
grid. Are you doing something that I am not doing here?

Michael,

Yes, the critical step is to have a text layer drawn on the map canvas and
geogrid as well. Try adding a lext layer, drawing, then changing parameters in
the text layer options, like boldness, angle of rotation, etc. Then click
'Redraw all layers'. Or, try turning the text layer off, change parameters,
redraw, then turn the text layer back on and redraw all layers. This not only
produces an error, but freezes all display buttons in gis.m. I have to kill
gis.m and start another instance of it to continue.

~ Eric.

HB:

Eric: any reason you aren't letting d.grid label the lines for you?
It should be formatted and rotated nicely (e.g. 44:26N)
(i.e. is there something about that you think could be improved?)

The geogrid tool in gis.m doesn't allow you to change the font size. So I wanted to draw a lat-long grid over my UTM map display, but turn off graticule labels so I could use a dedicated text layer with larger labels instead. Like for making screenshots and figures for reports - the default text size of the geogrid labels are too small to read without squinting.

PS - the text tool is the third button from the right on the top row of buttons in gis.m.

~ Eric.

OK. The only thing I haven't done is to turn off the grid text. I'll try
that next. Thanks for the confirmation about which text button. I tried
both, however.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Fri, 17 Nov 2006 09:03:35 -0500
To: Hamish <hamish_nospam@yahoo.com>, Michael Barton <michael.barton@asu.edu>
Cc: <grass-dev@grass.itc.it>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

HB:

Eric: any reason you aren't letting d.grid label the lines for you?
It should be formatted and rotated nicely (e.g. 44:26N)
(i.e. is there something about that you think could be improved?)

The geogrid tool in gis.m doesn't allow you to change the font size. So I
wanted to draw a lat-long grid over my UTM map display, but turn off graticule
labels so I could use a dedicated text layer with larger labels instead. Like
for making screenshots and figures for reports - the default text size of the
geogrid labels are too small to read without squinting.

PS - the text tool is the third button from the right on the top row of
buttons in gis.m.

~ Eric.

Hamish,

For 6.3, I've added a few new features, including a layer for the d.text.new
(soon to be renamed??) module that includes font setting via the GRASS_FONT
environmental variable, and mouse placement for decorations and text. It
won't be there on 6.2 or older 6.3 versions.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Hamish <hamish_nospam@yahoo.com>
Date: Fri, 17 Nov 2006 15:27:46 +1300
To: "Patton, Eric" <epatton@nrcan.gc.ca>
Cc: <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

Patton, Eric wrote:

3. Add a text layer. Text to display was a label for the 103 45'W
meridian, choose mouse placement, bold text, rotate -88 degrees. All
other options set to default values.

how do you get to that tool? "PS txt" is the last button on the top row
of the GIS manager for me (6.2, 6.3).

I see in the help page it should be there:

"Add text layer
Adds layer to display a line of text using default GRASS font (selected
with d.font). Options include: text placement (screen coordinates); and
text size, bolding, and color. See d.text."

but no button for it. Am I blind?

?
Hamish

I think I found and fixed it.

It was not in grid but in the font setting environmental variable in
dtext.tcl.

The script was resetting GRASS_FONT after running d.text.new. If GRASS_FONT
was not initially set, the script tried to set it to "". This caused a
failure in running d.frame -e for some reason. Anyway, if GRASS_FONT is
initially not set, it is unset (rather than being set to "") after running
d.text. I think this fixes the problem.

Please test and let me know.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Fri, 17 Nov 2006 09:03:35 -0500
To: Hamish <hamish_nospam@yahoo.com>, Michael Barton <michael.barton@asu.edu>
Cc: <grass-dev@grass.itc.it>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

HB:

Eric: any reason you aren't letting d.grid label the lines for you?
It should be formatted and rotated nicely (e.g. 44:26N)
(i.e. is there something about that you think could be improved?)

The geogrid tool in gis.m doesn't allow you to change the font size. So I
wanted to draw a lat-long grid over my UTM map display, but turn off graticule
labels so I could use a dedicated text layer with larger labels instead. Like
for making screenshots and figures for reports - the default text size of the
geogrid labels are too small to read without squinting.

PS - the text tool is the third button from the right on the top row of
buttons in gis.m.

~ Eric.

Yes! I very happy to report this bug has been vanquished. Thanks very much Michael! Now I don't have to do all my figures in Arc.

Cheers,

~ Eric.

-----Original Message-----
From: Michael Barton
To: Patton, Eric; Hamish
Cc: grass-dev@grass.itc.it
Sent: 11/17/2006 1:30 PM
Subject: Re: [GRASS-dev] Error in redrawing text layer in gis.m

I think I found and fixed it.

It was not in grid but in the font setting environmental variable in
dtext.tcl.

The script was resetting GRASS_FONT after running d.text.new. If
GRASS_FONT
was not initially set, the script tried to set it to "". This caused a
failure in running d.frame -e for some reason. Anyway, if GRASS_FONT is
initially not set, it is unset (rather than being set to "") after
running
d.text. I think this fixes the problem.

Please test and let me know.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Fri, 17 Nov 2006 09:03:35 -0500
To: Hamish <hamish_nospam@yahoo.com>, Michael Barton

<michael.barton@asu.edu>

Cc: <grass-dev@grass.itc.it>
Conversation: [GRASS-dev] Error in redrawing text layer in gis.m
Subject: RE: [GRASS-dev] Error in redrawing text layer in gis.m

HB:

Eric: any reason you aren't letting d.grid label the lines for you?
It should be formatted and rotated nicely (e.g. 44:26N)
(i.e. is there something about that you think could be improved?)

The geogrid tool in gis.m doesn't allow you to change the font size.

So I

wanted to draw a lat-long grid over my UTM map display, but turn off

graticule

labels so I could use a dedicated text layer with larger labels

instead. Like

for making screenshots and figures for reports - the default text size

of the

geogrid labels are too small to read without squinting.

PS - the text tool is the third button from the right on the top row

of

buttons in gis.m.

~ Eric.