Re: [GRASS-dev] change in vector area format?
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 ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] change in vector area format?
Michael Barton wrote: Maybe I just missed the announcement. But I was surprised to find that areas no longer displayed as areas in GRASS 7, but only as boundaries. After trying multiple vector area files and considerable futzing with various settings I got an error that said that the topology was bad. When I rebuilt topology I could again display areas. Does this rebuilding of vector areas under GRASS 7 have any negative repercussions for displaying the same files in GRASS 6? 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 grass6 vector only on level 1 (no topo) and areas are not available until topo has been rebuilt. This change was submitted to trunk on July 13 2009 as r38385, see also [1]. The announcement is here [2]. We could change grass7 behaviour to built sidx on the fly if it is not available, but that defeats the purpose of the file-based spatial index. Just run v.what on a larger vector map once in grass6 and once in grass7 after rebuilding topo, elev_lid792_bepts in nc_spm_08 is a good example. Your suggestions about additional functionality in v.what would also heavily profit from it (is on my todo list...). Markus M [1] https://trac.osgeo.org/grass/wiki/Grass7/VectorLib [2] http://lists.osgeo.org/pipermail/grass-dev/2009-July/045098.html ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] change in vector area format?
Thanks for the explanation. I won't worry about running v.build in GRASS 7 then. 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. BTW, I'm glad to see interest in my v.what suggestions. These were an important component of a set of suggestions to standardize and enhance vector processing. Best Michael On Dec 15, 2009, at 6:06 AM, Markus Metz wrote: Michael Barton wrote: Maybe I just missed the announcement. But I was surprised to find that areas no longer displayed as areas in GRASS 7, but only as boundaries. After trying multiple vector area files and considerable futzing with various settings I got an error that said that the topology was bad. When I rebuilt topology I could again display areas. Does this rebuilding of vector areas under GRASS 7 have any negative repercussions for displaying the same files in GRASS 6? 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 grass6 vector only on level 1 (no topo) and areas are not available until topo has been rebuilt. This change was submitted to trunk on July 13 2009 as r38385, see also [1]. The announcement is here [2]. We could change grass7 behaviour to built sidx on the fly if it is not available, but that defeats the purpose of the file-based spatial index. Just run v.what on a larger vector map once in grass6 and once in grass7 after rebuilding topo, elev_lid792_bepts in nc_spm_08 is a good example. Your suggestions about additional functionality in v.what would also heavily profit from it (is on my todo list...). Markus M [1] https://trac.osgeo.org/grass/wiki/Grass7/VectorLib [2] http://lists.osgeo.org/pipermail/grass-dev/2009-July/045098.html ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] change in vector area format?
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. 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 ?? 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) Hamish ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev