On 01-10-15 17:49, Vaclav Petras wrote:

On Thu, Oct 1, 2015 at 11:28 AM, Paulo van Breugel <[email protected] <mailto:[email protected]>> wrote:

    with VectorTopo('testB', mode='rw') as vectormap:


At the and it makes sense. 'w' removes the vectors and starts over. 'rw' keep the file but ones it for writing. Perhaps 'a' would make better sense in this case. What the documentation says?

On https://grass.osgeo.org/grass70/manuals/libpython/pygrass_vector.html it is mentioned that:

"/The open() method supports a number of option arguments (see the Info documentation for a complete list). In particular, the mode argument can take a a value of r for reading, w for writing, or rw for reading/writing." [...] /"/If a vector map is opened with the mode w or rw, then the user can write new features to the dataset/".

I think this description is somewhat ambiguous. Especially the mode='w' is unclear to me; I could clearly not write new features to an (existing) vector layer. It might be nice to have a short one-line explanation of each of these options, explaining the difference.



_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to