[GRASS-dev] [GRASS GIS] #425: v.out.ogr: don't use random access to find attributes

#425: v.out.ogr: don't use random access to find attributes
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: major | Milestone: 6.5.0
Component: Vector | Version: unspecified
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Moved here from
http://trac.osgeo.org/grass/browser/grass/trunk/doc/vector/TODO#L250

Radim suggested:

v.out.ogr is very slow because it is using random access to the
attributes. It should be rewritten so that all attributes are selected by
one query, geometry for each attribute can be searched by category index
(which is fast).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/425&gt;
GRASS GIS <http://grass.osgeo.org>

#425: v.out.ogr: don't use random access to find attributes
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.5.0
Component: Vector | Version: unspecified
Resolution: | Keywords:
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by mlennert):

Replying to [ticket:425 neteler]:
> Moved here from
http://trac.osgeo.org/grass/browser/grass/trunk/doc/vector/TODO#L250
>
> Radim suggested:
>
> v.out.ogr is very slow because it is using random access to the
attributes. It should be rewritten so that all attributes are selected by
one query, geometry for each attribute can be searched by category index
(which is fast).

I've implemented something like this in a long-ago rewrite (never
committed) of d.vect.chart [1] - see plot.c. It uses db_open_select_cursor
to access the table in one query and then for each row Vect_cidx_find_all
to find the geometries associated to the cat value in that row.

Moritz

[1] http://lists.osgeo.org/pipermail/grass-dev/2006-October/026624.html

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/425#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>