[GRASS5] Re: Vector points and topology

Radim Blazek radim.blazek at gmail.com
Mon Jul 4 04:31:21 EDT 2005


On 7/1/05, Markus Neteler <neteler at itc.it> wrote:
> Ciao Radim,
> 
> here some open questions concerning the topology:
> 
> - do we have to calculate topology for lines, areas etc in
>   r.random if we only generate points?
> - what's the purpose of

It would be possible to skip building of areas if there are no boundaries
in the file (plus->n_blines). I dont believe however that it coud save much time
because it only checks types of lines previously registered, that means 
stored in an array in the memory.
 
>    \fn int Vect_build_partial ( struct Map_info *Map, int top, FILE *msgout )
>    \brief build partial topology for vector map
>    This functions optionaly builds only some parts of topology.
> 
>   Can this be a way to speed up r.random and similar commands?

No, Vect_build_partial() should only be used in special cases of
vector processing
and Vect_build() should be used at the end of each module writing a vector.

> - how to speed up v.out.ogr export (230 minutes for 100k points)

It has nothing to do with topology. The problem is random access to attributes.
It is necessary to change v.out.ogr so that it opens select cursor
for attributes sorted by cat and then it must process geometry 
in the cats order (using category index) and read attributes sequentialy 
from the opened select cursor (checking always if the cat is available).

> - which is the module I should use as reference to explain vector
>   programming *with* attributes?

It depends on specific task, v.to.rast, v.extract or v.out.ogr are
using different
approach. It is always necessary to take a module doing something similar
to the task you want to do.

Radim




More information about the grass-dev mailing list