However, it works with lines - I can output a labels file if the layer
comprises line features.
----
_____________
I just tested with census_wake2000 from the NC demo dataset and can
confirm the issue.
The problem seems to be with the type 'area' which is not recognised
somewhere along the process. Adding the option 'centroid' to the 'type'
parameter and using that option makes it create the expected labels.
I'm not sure which would be the better solution:
- Leave the options as is and change the code so that 'area' is remapped
to 'centroid'
#1942: v.label.sa not working with areas
------------------------+---------------------------------------------------
Reporter: richardc | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.label.sa | Platform: Linux
Cpu: x86-32 |
------------------------+---------------------------------------------------
Comment(by hamish):
the milestone is just an indicator, not policy. it only really needs to be
correct when the ticket is closed, since then it gets auto-added to the
"changes since last version" trac-wiki page. FWIW my logic was that at
this point we should be focusing our energy on the last few major bugs for
6.4.3, the minor stuff can happen later. If someone provides a fix before
then, no problem. As for backporting to relbr64, ''as long as there's time
to test it properly''. Any commit to that branch in the last moments
before release is going to be risky..
#1942: v.label.sa not working with areas
-------------------------+--------------------------------------------------
Reporter: richardc | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.label.sa | Platform: Linux
Cpu: x86-32 |
-------------------------+--------------------------------------------------
Comment(by mlennert):
Replying to [comment:4 wolf]:
> Oh I'm so happy to someone working on v.label.sa. I didn't really
implement it for areas yet, but now that I see someone is looking for that
feature I'm more than happy to work on it. Assigning this to me. I can't
promise a time, but I'm definitely going to work on this!
As mentioned my comment reproduced in the original report, I don't think
this is much work, as areas can be considered as their centroids and so it
becomes a placement of labels for points. Unless you want to optimise in
terms of size of areas, etc. I would suggest to implement a simple
solution at first in just replacing GV_AREA by GV_CENTROID. You can then
always optimize specifically for areas later.
AFAICT, the problem now is that in labels.c you have
but Vect_get_num_primitives() does not allow for GV_AREA.
So probably just replacing GV_AREA by GV_CENTROID in legal_types before
calling Vect_get_num_primitives should work (but this is just after a very
superficial look...).
The other, easier, solution is to replace area by centroid in the possible
answers to the type option.
#1942: v.label.sa not working with areas
-------------------------+--------------------------------------------------
Reporter: richardc | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.label.sa | Platform: Linux
Cpu: x86-32 |
-------------------------+--------------------------------------------------
Comment(by wolf):
Thanks for the analysis.
This sounds like a good, quick, interim solution, I'll have a look at it.
And Indeed later I'd like to extend this to deal with areas in a more
intelligent way.
#1942: v.label.sa not working with areas
-------------------------+--------------------------------------------------
Reporter: richardc | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.label.sa | Platform: Linux
Cpu: x86-32 |
-------------------------+--------------------------------------------------
Comment(by neteler):
BTW, I tried to compile v.label.sa in GRASS 7 but it fails due
{{{
labels.c:86:5: warning: implicit declaration of function
‘find_font_from_freetypecap’
...
labels.c:98:5: warning: implicit declaration of function ‘free_fontcap’
}}}