[GRASS-dev] grass6/grass7 vector compatibility
Markus Metz
markus.metz.giswork at googlemail.com
Tue Dec 15 08:43:31 EST 2009
Vector topology must be rebuilt in grass7 with v.build for grass6
vectors in order to have topology available.
Up to now, grass7 vectors are fully compatible with grass6 vectors:
grass6 can work with grass7 vectors. Not the other way around, because
in grass7, the spatial index is again file-based, not built on the fly.
Consequently, grass7 can open a grass57/grass6 vector only on level 1
(no topo) and areas are not available until topo has been rebuilt.
Copying vectors works in grass7, even if one or more support files are
missing, i.e. you can copy a vector in grass6 format or a possibly
broken vector from another mapset to the current mapset. That is new
(r39977) and not possible in grass6.
Keeping the spatial index in file serves two purposes: first, reduced
memory requirements because only the sidx header is loaded to memory
when opening an old vector on level 2, second, faster spatial queries
because the spatial index is not rebuilt each time a vector is opened,
it is existing in file.
The procedures to read to/write from sidx have been written anew from
scratch because the old grass5 procedures did not allow file-based
search, the whole index was reconstructed in memory. The new spatial
index itself is loosely based on the old code, the function names are
the same, pretty much everything else changed (from R-tree to R*-tree
plus a new structure holding info about the search tree, good practice
for search trees, see e.g. libavl and libspatialindex).
Markus M
More information about the grass-dev
mailing list