[GRASS-user] how to v.label d.labels usage - labels do not appear
hamish_b at yahoo.com
Tue Sep 28 07:22:03 EDT 2010
> 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
> 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 ... :(
> 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)
ps- see also 'd.vect disp=attr attrcol=column_name'
More information about the grass-user