[GRASS-dev] Re: [GRASS GIS] #831: v.category options sum, del, and add do nothing

GRASS GIS trac at osgeo.org
Fri Dec 4 12:57:44 EST 2009


#831: v.category options sum, del, and add do nothing
-------------------------+--------------------------------------------------
  Reporter:  isaacullah  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect      |      Status:  new                      
  Priority:  major       |   Milestone:  6.4.0                    
 Component:  Vector      |     Version:  6.4.0 RCs                
Resolution:              |    Keywords:  v.category               
  Platform:  All         |         Cpu:  All                      
-------------------------+--------------------------------------------------
Comment (by isaacullah):

 Here are text line outputs for v.category operation:

 First display initial cats:
 {{{
 GRASS 6.4.0RC5 (nc_spm_08):~ > v.category input=busroute1 at PERMANENT
 option=report
 Layer/table: 1/busroute1
 type       count        min        max
 point          0          0          0
 line           3          1          2
 boundary       0          0          0
 centroid       0          0          0
 area           0          0          0
 all            3          1          2

 GRASS 6.4.0RC5 (nc_spm_08):~ > v.category input=busroute11 at PERMANENT
 option=report
 Layer/table: 1/busroute11
 type       count        min        max
 point          0          0          0
 line           1          1          1
 boundary       0          0          0
 centroid       0          0          0
 area           0          0          0
 all            1          1          1
 }}}

 Next attempt to use sum function to add "2" to cats in
 busroute11 at PERMANENT:
 {{{
 GRASS 6.4.0RC5 (nc_spm_08):~ > v.category input=busroute11 at PERMANENT
 output=busroute11_mod_cats option=sum cat=2 --overwrite
 WARNING: Vector map <busroute11_mod_cats> already exists and will be
          overwritten
 Processing features...
 Copying attribute table(s)...
 Building topology for vector map <busroute11_mod_cats>...
 Registering primitives...
 1 primitives registered
 434 vertices registered
 Building areas...
  100%
 0 areas built
 0 isles built
 Attaching islands...
 Attaching centroids...
  100%
 Number of nodes: 1
 Number of primitives: 1
 Number of points: 0
 Number of lines: 1
 Number of boundaries: 0
 Number of centroids: 0
 Number of areas: 0
 Number of isles: 0
 v.category complete. 1 features modified.
 }}}

 Now report what v.category thinks it has done:
 {{{
 GRASS 6.4.0RC5 (nc_spm_08):~ > v.category
 input=busroute11_mod_cats at PERMANENT option=report
 Layer/table: 1/busroute11_mod_cats
 type       count        min        max
 point          0          0          0
 line           1          3          3
 boundary       0          0          0
 centroid       0          0          0
 area           0          0          0
 all            1          3          3
 }}}

 You can see, everything appears to work fine, but output of db.select
 shows cat not changed in table:
 {{{
 GRASS 6.4.0RC5 (nc_spm_08):~ > db.select table=busroute11_mod_cats
 cat|ROUTE
 1|11

 }}}

 The cat in the table is not changed!

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/831#comment:2>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list