~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to scripts/v.build.all/v.build.all.py

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
############################################################################
 
3
#
 
4
# MODULE:       v.build.all
 
5
# AUTHOR(S):    Glynn Clements, Radim Blazek
 
6
# PURPOSE:      Build all vectors in current mapset
 
7
# COPYRIGHT:    (C) 2004, 2008-2009 by the GRASS Development Team
 
8
#
 
9
#               This program is free software under the GNU General Public
 
10
#               License (>=v2). Read the file COPYING that comes with GRASS
 
11
#               for details.
 
12
#
 
13
#############################################################################
 
14
 
 
15
#%module
 
16
#% description: Rebuilds topology on all vector maps in the current mapset.
 
17
#% keyword: vector
 
18
#% keyword: topology
 
19
#%end
 
20
 
 
21
import sys
 
22
from grass.script import core as grass
 
23
from grass.exceptions import CalledModuleError
 
24
 
 
25
def main():
 
26
    env = grass.gisenv()
 
27
    mapset = env['MAPSET']
 
28
    ret = 0
 
29
 
 
30
    vectors = grass.list_grouped('vect')[mapset]
 
31
    num_vectors = len(vectors)
 
32
    
 
33
    if grass.verbosity() < 2:
 
34
        quiet = True
 
35
    else:
 
36
        quiet = False
 
37
        
 
38
    i = 1
 
39
    for vect in vectors:
 
40
        map = "%s@%s" % (vect, mapset)
 
41
        grass.message(_("%s\nBuilding topology for vector map <%s> (%d of %d)...\n%s") % \
 
42
                          ('-' * 80, map, i, num_vectors, '-' * 80))
 
43
        grass.verbose(_("v.build map=%s") % map)
 
44
        try:
 
45
            grass.run_command("v.build", map=map, quiet=quiet)
 
46
        except CalledModuleError:
 
47
            grass.error(_("Building topology for vector map <%s> failed") % map)
 
48
            ret = 1
 
49
        i += 1
 
50
 
 
51
    return ret
 
52
 
 
53
 
 
54
if __name__ == "__main__":
 
55
    options, flags = grass.parser()
 
56
    sys.exit(main())