[GRASS-user] how to v.label d.labels usage - labels do not appear

Dear all

I am quite new to GRASS, only use it few times.

I need to label my points, so i tried to use v.label

i have this file which i imported with :

v.in.ascii --o in=/stations_LU_AB out=stations_LU_ab

705131.45|5513243.33|LU0104A
738198.49|5513485.53|LU0105A
715628.70|5486561.69|LU0001A
739861.59|5489430.06|LU0099A
715474.80|5488410.95|LU0102A
726771.85|5500003.64|LU0013A
726722.32|5499259.57|LU0101A
725889.30|5499966.84|LU0100A
710345.43|5504908.79|LU0008A
727890.58|5537167.57|LU0103A
725969.76|5499970.19|LU0012A
717207.29|5487366.69|LU0107A
728209.78|5537181.14|LU0018A
725777.59|5505529.71|LU0106A

and it works fine... then i used v.label

v.label labels=stat_labels map=stations_LU_ab column=cat type=point,centroid
layer=1 xoffset=0 yoffset=0 reference=center font=standard size=100
color=black rotation=0 width=1 hcolor=none hwidth=0 background=none
border=none opaque=yes

... there were no complains:
"Labeled 14 lines."

and finally :

d.vect stations_LU_ab
d.labels stat_labels

and it nothing appears ... :frowning:

Could you give me some lights in what I am doing wrong?

I thank you in advance

Lara A. REis
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-v-label-d-labels-usage-labels-do-not-appear-tp5578731p5578731.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On 28/09/2010 12:02, lara wrote:

Dear all

I am quite new to GRASS, only use it few times.

I need to label my points, so i tried to use v.label

i have this file which i imported with :

  v.in.ascii --o in=/stations_LU_AB out=stations_LU_ab

705131.45|5513243.33|LU0104A
738198.49|5513485.53|LU0105A
715628.70|5486561.69|LU0001A
739861.59|5489430.06|LU0099A
715474.80|5488410.95|LU0102A
726771.85|5500003.64|LU0013A
726722.32|5499259.57|LU0101A
725889.30|5499966.84|LU0100A
710345.43|5504908.79|LU0008A
727890.58|5537167.57|LU0103A
725969.76|5499970.19|LU0012A
717207.29|5487366.69|LU0107A
728209.78|5537181.14|LU0018A
725777.59|5505529.71|LU0106A

and it works fine... then i used v.label

v.label labels=stat_labels map=stations_LU_ab column=cat type=point,centroid
layer=1 xoffset=0 yoffset=0 reference=center font=standard size=100
color=black rotation=0 width=1 hcolor=none hwidth=0 background=none
border=none opaque=yes

... there were no complains:
"Labeled 14 lines."

and finally :

d.vect stations_LU_ab
d.labels stat_labels

and it nothing appears ... :frowning:
   

Maybe you're not at the right region. Try first:
g.region vect=stations_LU_ab

Could you give me some lights in what I am doing wrong?

I thank you in advance

Lara A. REis
   
--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918

thnaks Micha..
But i've tried that and it does not work...

I 'm probably skiping some important step...??!!?!?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-v-label-d-labels-usage-labels-do-not-appear-tp5578731p5578868.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On 28/09/2010 12:55, lara wrote:

thnaks Micha..
But i've tried that and it does not work...

I 'm probably skiping some important step...??!!?!?
   

Do you see anything in the graphics monitor windows?

--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918

I see my raster map.. when i display it first...
if not.. i see nothing..
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-v-label-d-labels-usage-labels-do-not-appear-tp5578731p5578900.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Lara wrote:

Dear all
I am quite new to GRASS, only use it few times.
I need to label my points, so i tried to use v.label
i have this file which i imported with :
v.in.ascii --o in=/stations_LU_AB out=stations_LU_ab

705131.45|5513243.33|LU0104A

...

725777.59|5505529.71|LU0106A

and it works fine... then i used v.label

v.label labels=stat_labels map=stations_LU_ab column=cat
  type=point,centroid layer=1 xoffset=0 yoffset=0
  reference=center font=standard size=100
  color=black rotation=0 width=1 hcolor=none hwidth=0
  background=none border=none opaque=yes

... there were no complains:
"Labeled 14 lines."

and finally :

d.vect stations_LU_ab
d.labels stat_labels

and it nothing appears ... :frowning:

Could you give me some lights in what I am doing wrong?

I think I know the reason-

the quick answer is try to use the v.label fontsize= option.
set it to 10 or 12 or so.

the long answer is that v.label has both size= and fontsize=
options. The fontsize= works as you might expect, but the size=
option (the default) is measured in map units. So in your case
it would make the labels sized as 100 meters on the map. If you
zoom way out that becomes very tiny and the label disappears.
(see also the d.labels min and max options)
This exists so you can have things like town names sized to the
population, so when you zoom in you see the small towns but when
you zoom out to the country scale you only see the big cities,
and labels do not overlap when you change the zoom.
Also it is for precision when designing cartography with ps.map.

But if you set fontsize=10 or so, the labels will be the same
size regardless of the map scale.

(I had this same problem last week)

Hamish

ps- see also 'd.vect disp=attr attrcol=column_name'

On 28/09/2010 13:07, lara wrote:

I see my raster map.. when i display it first...
  if not.. i see nothing..
   

Raster?

Please try this first
First: v.info -c
What's the name of the column that contains the labels?
If there are no column names, then rerun the ascii import as follows:

v.in.ascii --o in=/stations_LU_AB out=stations_LU_ab columns="x double precision, y double precision, label varchar(8)"
(I'm assuming the columns are X first then Y)
Recheck v.info -c to be sure you've got the label column.

Now do:
d.erase
g.region -p vect=stations_LU_ab
d.vect stations_LU_ab disp=shape,attr attrcol=label

What do you get? If this works, then redo the v.label command and retry the d.vect and d.labels command as before.

--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918

Thanks a lot, it did apear something but not what i wanted , but with your
sugestion "ps- see also 'd.vect disp=attr attrcol=column_name' "
it worked !
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-v-label-d-labels-usage-labels-do-not-appear-tp5578731p5581564.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Thanks it worked!

:smiley:
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-v-label-d-labels-usage-labels-do-not-appear-tp5578731p5581567.html
Sent from the Grass - Users mailing list archive at Nabble.com.