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

Radim Blazek radim.blazek at gmail.com
Mon Sep 25 05:45:36 EDT 2006


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.

Radim

> Markus
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>




More information about the grass-dev mailing list