[GRASS-dev] [GRASS GIS] #3123: d.legend.vect: wrong handling of spaces in legend_label

#3123: d.legend.vect: wrong handling of spaces in legend_label
-------------------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Addons | Version: unspecified
Keywords: d.legend.vect, gsoc2016, | CPU: Unspecified
  cartography |
Platform: Unspecified |
-------------------------------------------------+-------------------------
When using spaces in the legend_label parameter of d.vect, d.legend.vect
only displays the first word before the space.

An example with the NC dataset:

{{{
d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1
legend_label=Hôpitaux
d.legend.vect
}}}

'Hôpitaux' is displayed correctly.

{{{
d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1
legend_label="Les Hôpitaux"
d.legend.vect
}}}

Only 'Les' is displayed in the legend.

In the legend file, there is

{{{
Les Hôpitaux|basic/x|5|black|200:200:200|1|point|160
}}}

So the issue seems to be clearly with d.legend.vect.

Another issue with white space:

{{{
d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1
legend_label=" "
d.legend.vect
}}}

Now I see an 'x' as the label in the map display. In addition, if I
repeatedly click on 'Apply' in the d.legend.vect gui, the label displayed
cycles through a series of weird combinations of characters, always
beginning with the 'x'. Combinations I've seen include

{{{
xK[
x[cc
x
x{
}}}

I would guess this some issue with memory address handling ?

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

#3123: d.legend.vect: wrong handling of spaces in legend_label
-------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Addons | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by annakrat):

Please try with the latest fix in d.legend.vect (just download
d.legend.vect again).

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

#3123: d.legend.vect: wrong handling of spaces in legend_label
-------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Addons | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by veroandreo):

Replying to [comment:1 annakrat]:
> Please try with the latest fix in d.legend.vect (just download
d.legend.vect again).

Just tested, it now handles spaces in labels correctly :slight_smile:

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

#3123: d.legend.vect: wrong handling of spaces in legend_label
-------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.5
Component: Addons | Version: unspecified
Resolution: fixed | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by mlennert):

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

Comment:

Yes, nice.

Thanks.

Closing the bug.

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

#3123: d.legend.vect: wrong handling of spaces in legend_label
-------------------------+-------------------------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Addons | Version: unspecified
Resolution: fixed | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by annakrat):

* milestone: 7.0.5 => 7.2.0

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