[GRASS-dev] [GRASS GIS] #2413: pygrass: number_of wrong function associated

GRASS GIS trac at osgeo.org
Fri Sep 12 10:53:14 PDT 2014


#2413: pygrass: number_of wrong function associated
----------------------------+-----------------------------------------------
 Reporter:  artegion        |       Owner:  grass-dev@…              
     Type:  defect          |      Status:  new                      
 Priority:  normal          |   Milestone:  6.4.5                    
Component:  Python          |     Version:  svn-releasebranch70      
 Keywords:  pygrass vector  |    Platform:  All                      
      Cpu:  Unspecified     |  
----------------------------+-----------------------------------------------

Comment(by lucadelu):

 Replying to [comment:2 zarch]:
 > Replying to [comment:1 lucadelu]:
 >
 > Mmh, I'm still not convinced running the code below on NC:
 >

 maybe the test_vect_features is wrong, I changed as this


 {{{
 def test_vect_features(vectname):
     print(vectname)
     with VectorTopo(vectname, mode='r') as vect:
         for key in sorted(_NUMOF):
             print("  %20s %6d" % (key, vect.number_of(key)))
         print('  primitives:')
         pprint(vect.num_primitives())
         v.info(vectname)
     print
 }}}

 this is mine output


 {{{

 schools
                  areas      0
                dblinks      1
                  faces      0
                  holes      0
                islands      0
                kernels      0
                  lines    167
                  nodes      0
                 points      5
          updated_lines      0
          updated_nodes      0
                volumes      0
   primitives:
 {'area': 0,
  'boundary': 0,
  'centroid': 0,
  'face': 0,
  'kernel': 0,
  'line': 0,
  'point': 167,
  'volume': 0}
 +----------------------------------------------------------------------------+
  | Name:            schools
 |
  | Mapset:          PERMANENT
 |
  | Location:        nc_basic_spm_grass7
 |
  | Database:        /home/lucadelu/grassdata
 |
  | Title:           Wake County schools (points map)
 |
  | Map scale:       1:1
 |
  | Name of creator: helena
 |
  | Organization:    NC OneMap
 |
  | Source date:     Tue Nov  7 19:34:09 2006
 |
  | Timestamp (first layer): none
 |
 |----------------------------------------------------------------------------|
  | Map format:      native
 |
 |----------------------------------------------------------------------------|
  |   Type of map: vector (level: 2)
 |
  |
 |
  |   Number of points:       167             Number of centroids:  0
 |
  |   Number of lines:        0               Number of boundaries: 0
 |
  |   Number of areas:        0               Number of islands:    0
 |
  |
 |
  |   Map is 3D:              No
 |
  |   Number of dblinks:      1
 |
  |
 |
  |   Projection: Lambert Conformal Conic
 |
  |
 |
  |               N:   248159.84441077    S:   203559.01136227
 |
  |               E:   671714.55110786    W:   619215.13388253
 |
  |
 |
  |   Digitization threshold: 0
 |
  |   Comment:
 |
  |
 |
 +----------------------------------------------------------------------------+


 streams
                  areas      0
                dblinks      1
                  faces      0
                  holes      0
                islands      0
                kernels      0
                  lines   8554
                  nodes   8645
                 points      5
          updated_lines      0
          updated_nodes      0
                volumes      0
   primitives:
 {'area': 0,
  'boundary': 0,
  'centroid': 0,
  'face': 0,
  'kernel': 0,
  'line': 8554,
  'point': 0,
  'volume': 0}
 +----------------------------------------------------------------------------+
  | Name:            streams
 |
  | Mapset:          PERMANENT
 |
  | Location:        nc_basic_spm_grass7
 |
  | Database:        /home/lucadelu/grassdata
 |
  | Title:           South-West Wake streams (lines map)
 |
  | Map scale:       1:1
 |
  | Name of creator: helena
 |
  | Organization:    NC OneMap
 |
  | Source date:     Tue Nov  7 19:37:02 2006
 |
  | Timestamp (first layer): none
 |
 |----------------------------------------------------------------------------|
  | Map format:      native
 |
 |----------------------------------------------------------------------------|
  |   Type of map: vector (level: 2)
 |
  |
 |
  |   Number of points:       0               Number of centroids:  0
 |
  |   Number of lines:        8554            Number of boundaries: 0
 |
  |   Number of areas:        0               Number of islands:    0
 |
  |
 |
  |   Map is 3D:              No
 |
  |   Number of dblinks:      1
 |
  |
 |
  |   Projection: Lambert Conformal Conic
 |
  |
 |
  |               N:   228882.03322323    S:   214637.98658874
 |
  |               E:   645264.23103886    W:   629851.88519177
 |
  |
 |
  |   Digitization threshold: 0
 |
  |   Comment:
 |
  |
 |
 +----------------------------------------------------------------------------+


 }}}


 > So it is not clear to me what is not working, but I don't think that it
 is correct...
 >

 It seems better, but it is still strange the result of schools map
 (lines=167,points=5)

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



More information about the grass-dev mailing list