[GRASS-user] Problem with v.digit -- "region for current mapset is not set"

Tom Russo russo at bogodyn.org
Mon Jan 14 13:24:48 PST 2013


I'm attempting to do something I haven't done since March of 2011 --- digitizing
a trail off of a scanned/georeferenced paper map.  I'm using Grass 6.5 (the
svn version of develbranch_6).  I'm having trouble with v.digit even though
I'm doing *precisely* the same thing I have done over and over again for years,
just not recently.  I believe that a change made to v.digit between the last 
time I did this and today may be the cause, and I don't know what to do to get
it working again.

The problem I'm having is that when I fire up 
'v.digit -n map=newmapname bgcmd="d.rast basemapname"' I *always* get an
error message that "ERROR: region for current mapset is not set" followed by
instruction to run g.region.  At this point, I'm stuck, because even though
the tool bar and digitizing window show up, the base raster that I'm trying to
digitize off of is not displayed.

Thing is, the region IS set --- right before running v.digit I have done
a "g.region rast=basemapname".

Looking through SVN logs, it seems that a minor mod to v.digit was made back
in December of 2011, some months after the last time I did this process (which
was in March of 2011, right before a backcountry ski trip when I was 
digitizing a published trail map so I could make a custom map for my GPS).  
Since that change was precisely one that modified how v.digit handles its
temporary region, I'm wondering if it's busted.

Here's what I find:

v.digit *has* created a tmp_vdigit_<pid> file in the "windows" directory
of my database for the location/mapset.  The contents of this file precisely
match the WIND file for the mapset.  Yet somehow, v.digit still thinks
the region isn't set.  I am not sure if it's getting WIND_OVERRIDE set properly,
which it is supposedly doing via a putenv call.  

I tried turning on debugging with g.gisenv, but I didn't see anything in
the output that meant anything to me.  This is what I see:

D2/3: Variable = 0x805b560
D2/3: cmd 0 : d.rast estincomp
D2/3: bg_add(): cmd = d.rast estincomp
D2/3: cmd 0 : d.rast estincomp
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       1
D3/3: region item: zone:       13
D3/3: region item: north:      4374022
D3/3: region item: south:      4366938
D3/3: region item: east:       359460
D3/3: region item: west:       354486
D3/3: region item: cols:       2487
D3/3: region item: rows:       3542
D3/3: region item: e-w resol:  2
D3/3: region item: n-s resol:  2
D3/3: region item: top:        1.000000000000000
D3/3: region item: bottom:     0.000000000000000
D3/3: region item: cols3:      2487
D3/3: region item: rows3:      3542
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 2
D3/3: region item: n-s resol3: 2
D3/3: region item: t-b resol:  1
D1/3: Region: N = 4374022.000000 S = 4366938.000000 E = 359460.000000 W = 354486.000000
D2/3: Vect_open_new(): name = tenth_mtn_trails4
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: V1_open_new_nat(): name = tenth_mtn_trails4
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: dig__write_head()
D1/3: write coor size (0) to head
D2/3: coor body offset 14
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D3/3: Vect_build(): build = 4
Building topology for vector map <tenth_mtn_trails4>...
D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
D1/3: Vect_Rewind(): name = tenth_mtn_trails4
Registering primitives...
D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 14
0 primitives registered
0 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
D2/3: dig_cidx_sort()
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
D1/3: Vect_close(): name = tenth_mtn_trails4, mapset = PERMANENT, format = 0, level = 2
D1/3: get coor info: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/coor
D1/3: Info->size = 14, Info->mtime = 1358198180
D1/3: Vect_save_topo()
D1/3: Open topo: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/topo
D2/3: topo body offset 142
D2/3: topo body offset 142
D2/3: Vect_cidx_save()
D2/3: Open cidx: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/cidx
D3/3: dig_write_cidx_head()
D3/3: cidx body offset 13
D3/3: dig_write_cidx_head()
D3/3: cidx body offset 13
D1/3: close history file
D1/3: V1_close_nat(): name = tenth_mtn_trails4 mapset= PERMANENT
D1/3: get coor info: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/coor
D1/3: Info->size = 14, Info->mtime = 1358198180
D1/3: dig__write_head()
D1/3: write coor size (14) to head
D2/3: coor body offset 14
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: Vect_write_dblinks(): map = tenth_mtn_trails4, mapset = PERMANENT
D1/3: dbln file: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/dbln
D1/3: Dblinks written
New empty map created.
D1/3: Vect_open_old(): name = tenth_mtn_trails4 mapset= PERMANENT update = 1
D1/3: Vect_set_thresh(): thresh = 0.000000
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D1/3: open format file: 'PERMANENT/vector/tenth_mtn_trails4/frmt'
D1/3: Vector format: 0 (native)
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: Vect__read_head(): vector = tenth_mtn_trails4 at PERMANENT
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: Level request = 0
D1/3: Vect_open_topo(): name = tenth_mtn_trails4 mapset= PERMANENT
D1/3: get coor info: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/coor
D1/3: Info->size = 14, Info->mtime = 1358198180
D2/3: Topo header: file version 5.0 , supported from GRASS version 5.0
D2/3:   byte order 0
D2/3:   header size 142
D2/3:   with_z 0
D2/3:   coor size 14
D1/3: Topo head: coor size = 14, coor mtime = 1358198180
D1/3: dig_load_plus()
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D2/3: Topo header: file version 5.0 , supported from GRASS version 5.0
D2/3:   byte order 0
D2/3:   header size 142
D2/3:   with_z 0
D2/3:   coor size 14
D3/3: dig_alloc_isle():
D2/3: Vect_cidx_open(): name = tenth_mtn_trails4 mapset= PERMANENT
D3/3: dig_cidx_init()
D3/3: dig_read_cidx()
D3/3: dig_cidx_init()
D3/3: Cidx header: file version 5.0 , supported from GRASS version 5.0
D3/3:   byte order 0
D3/3:   header size 9
D1/3: V1_open_old_nat(): name = tenth_mtn_trails4 mapset = PERMANENT
D2/3: Coor header: file version 5.1 , supported from GRASS version 5.1
D2/3:   byte order 0
D2/3:   header size 14
D2/3:   with_z 0
D2/3:   coor size 14
D1/3: get coor info: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/coor
D1/3: Info->size = 14, Info->mtime = 1358198180
D1/3: coor size in head = 14, real coor file size= 14
D1/3: Vect_open_old(): vector opened on level 2
D1/3: Vect_read_dblinks(): map = tenth_mtn_trails4, mapset = PERMANENT
D3/3: Searching for FID column in OGR DB
D1/3: dbln file: /users/russo/GIS/Colorado/PERMANENT/vector/tenth_mtn_trails4/dbln
D1/3: Dblinks read
D1/3: Vect_Rewind(): name = tenth_mtn_trails4
D3/3: Vect_build_sidx_from_topo()
D1/3: dig_spidx_init()
D3/3: Spatial index was built
D3/3: Vect_hist_command()
D3/3: G_recreate_command()
D1/3: Map opened
D2/3: cat_init()
D2/3: symb_line_init()
D2/3: symb_node_init()
D3/3: Starting Tk_Main.
D3/3: v.digit Tcl_AppInit (...)
D3/3: Starting toolbox.tcl
D3/3: c_tool_centre()
D2/3: var_init
D2/3: Variable = 0x805b560
D2/3: cat_max_get() field = 1
D2/3: display_bg()
ERROR: region for current mapset is not set
       run "g.region"
D2/3: display_map()


I am unable to proceed here.  What else should I be looking at?  Has anyone
else been able to use v.digit in the 6.x development branch?

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

 




More information about the grass-user mailing list