[GRASS-dev] Vect_get_num_lines() versus Vect_get_num_primitives()

Markus Neteler neteler at itc.it
Mon Sep 25 07:50:49 EDT 2006


On Mon, Sep 25, 2006 at 11:45:36AM +0200, Radim Blazek wrote:
> On 9/25/06, Markus Neteler <neteler at itc.it> wrote:
> >Hi,
> >
> >trying the new Python-Vector API, I found a discrepancy which
> >I would like to understand:
> >
> >On 'roads' in Spearfish, v.info reports
> >   Number of lines:        825
> >based on Vect_get_num_primitives(&Map, GV_LINE)
> >
> >If I use in the Python API the Vect_get_num_lines(map),
> >I get
> >Number of lines: 2876
> >
> >Difference:
> >- Vect_get_num_primitives uses map->plus.n_llines
> >- Vect_get_num_lines      uses map->plus.n_lines
> >
> >Which one is right? Probably Vect_get_num_lines() should
> >use n_lines as well and we need an extra function to
> >report segments?
> 
> It must be a bug in Python API, Vect_get_num_lines() must
> also give 825.

While a bug in Python API is likely, I wonder about the
difference between

map->plus.n_llines  and
map->plus.n_lines

May I ask you to explain it (or point me to the docs?)?

Related: I assume that v.info should be changed to use
Vect_get_num_lines() etc instead of Vect_get_num_primitives()?

thanks
Markus




More information about the grass-dev mailing list