[GRASS5] v.in.ascii

Radim Blazek radim.blazek at gmail.com
Mon Jul 25 05:09:10 EDT 2005


On 7/25/05, Helena Mitasova <hmitaso at unity.ncsu.edu> wrote:
> I am trying to find a solution to the point data handling problem - we
> are currently stuck
> at about 3mil pts on average PC.
> 
> I was able to read over 6mil points after commenting out Vect_build in
> v.in.ascii/in.c
> I was able to display them but that was all I could do, all other
> commands
> require level 2 (topology).
> Several modules give error - cannot open on level 2 - (e.g. v.info,
> v.to.rast)
> some give a more helpful message - you need to run v.build (but that
> can lead
> to swapping and freezing of machine if the data set is over 3mil pts).
> 
> I am trying to get the following modules work with point data without
> topology:
> v.info, v.to.rast, v.surf.rst - for none of these topology for points
> is needed (at least I guess).
> Does anybody have any hints how to do that? I don't see an easy way how
> to separate
> treatment of independent points from that of lines.

v.info:
I think that it is necessary to handle differently level 1 and level 2.
The reported info will be different and you have to decide if you 
want to calculate extension for example for level 1 or it will not be 
available. 
Instead of 
  Vect_set_open_level (2);
  Vect_open_old_head (&Map, in_opt->answer, mapset);
use 
  level = Vect_open_old_head (&Map, in_opt->answer, mapset);
and then 
  if ( level >= 2 ) {
      // current report
  } else if (level == 1) {
     // print informations available on level 1, i.e. (probably)
     // without number of elements and without extension
     // or scan all elements and count them
  } else {
     // error
  }

v.to.rast:
Open the vector like in v.info, then if it is level < 2, print warning
and do not call do_areas(). 
do_lines() must be rewritten to use Vect_read_next_line() 
(sequential access) instead of Vect_read_line() (random access).

v.surf.rst:
lib/rst/interp_float/vinput2d.c must be changed to use Vect_read_next_line() 
(like v.to.rast). 
Then in v.surf.rst/main.c remove 'if (open_check < 2)' condition.

Radim




More information about the grass-dev mailing list