[GRASS-dev] [GRASS GIS] #3831: d.grid: -g and -w flags do not display any grid

#3831: d.grid: -g and -w flags do not display any grid
------------------------+---------------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.6.2
Component: Display | Version: svn-releasebranch76
Keywords: d.grid | CPU: Unspecified
Platform: Linux |
------------------------+---------------------------------
I have tested in NC location and in an UTM location with no success.

{{{
d.mon wx0
d.rast elevation
d.grid -g size=100
}}}

Nothing, no error either. Tested in trunk and 76 relbranch.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3831&gt;
GRASS GIS <https://grass.osgeo.org>

#3831: d.grid: -g and -w flags do not display any grid
--------------------------+---------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.2
Component: Display | Version: svn-releasebranch76
Resolution: | Keywords: d.grid
       CPU: Unspecified | Platform: Linux
--------------------------+---------------------------------

Comment (by Nikos Alexandris):

Here, works using the PNG driver or the wxGUI. Unfortunately, in my setup,
I cannot test a 'wx' monitor! But, isn't 'wx' essentially the same as the
GUI?

In a 'metric' Location:
{{{
g.proj -g
name=Lambert Conformal Conic
proj=lcc
datum=nad83
a=6378137.0
es=0.006694380022900787
lat_1=36.16666666666666
lat_2=34.33333333333334
lat_0=33.75
lon_0=-79
x_0=609601.22
y_0=0
no_defs=defined
unit=Meter
units=Meters
meters=1
}}}

Grids drawn as expected via
via
{{{
d.erase
d.grid size=1000 color=red width=5 -b -t
d.grid size=10000 color=blue width=10 fontsize=20
}}}
   https://i.imgur.com/Jm4WnLJ.png

In instructing `-g`, units matter
{{{
d.grid size=0.05 -g color=green fontsize=20 width=10
}}}
   - plain png output: https://i.imgur.com/M4g9OQY.png
   - in the wxGUI: https://i.imgur.com/G3mX7lu.png

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3831#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3831: d.grid: -g and -w flags do not display any grid
--------------------------+---------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.6.2
Component: Display | Version: svn-releasebranch76
Resolution: invalid | Keywords: d.grid
       CPU: Unspecified | Platform: Linux
--------------------------+---------------------------------
Changes (by veroandreo):

* status: new => closed
* resolution: => invalid

Comment:

Indeed! And it also works as expected in wx monitors. Thanks for the heads
up :slight_smile:

If -g or -w is to be used in a projected location (no need to use them if
location is latlon), size must be in degrees and not really in map units
(m or other).

Closing as invalid (should have read the manual more carefully)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3831#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>