[GRASS-dev] change in vector area format?
Markus Metz
markus.metz.giswork at googlemail.com
Wed Dec 16 03:18:01 EST 2009
Hamish wrote:
> Michael wrote:
>
>> Somewhere along the line, we could probably use a script that
>> automatically runs v.build on all vectors in a mapset to build
>> the file based spatial index.
>>
>
> it could be called "v.build.all". ;-)
> (we have been down this road before during grass 5.7 ...)
>
> perhaps that script could get a new flag which besides running v.build
> could optionally run a non-interactive dummy v.what session to build
> the spatial index file as well.
Contrary to grass6, the spatial index is available as soon as a vector
is opened on level 2 (with topology), so there is no need for an extra
v.what.
> I guess a flag to build the index
> without rebuilding topology could be useful too. at which point we
> may as well make it a multichoice option:
> build=topology,spatial_index,both
> with the default being just the topology
> ??
>
The spatial index can be built from topo, as done in grass6, but topo
building (attaching islands and centroids) needs the spatial index.
> and should it rebuild the sp.index if already there? or just skip past
> it? (ie option to just run it for vector maps that need it)
>
A silent transition from grass6 to grass7 would be that the spatial
index is built on the fly if not available, as done in grass6, and then
written out when the vector is closed.
If some of the changes described in ticket 542 are implemented, things
become a bit more difficult, the whole topology, that is, everything
that's supposed to be in the topo, sidx and cidx file, must be redone.
Then I would rather go for something like v.build.all or v.convert.
Automagically converting vectors from grass6 to grass7 can be quite
annoying for a vector with many areas and islands, because it can easily
take hours, so I assume the user wants some control over it and not see
the system magically being busy for hours. For the spatial index it's
ok, it's done in grass6 every time a vector is opened.
So for the time being I would opt for the silent transition that may
need to be disabled again at a later stage.
Markus M
More information about the grass-dev
mailing list