[GRASS-dev] [GRASS GIS] #2324: v.to.rast: useless area warning on points-only maps

GRASS GIS trac at osgeo.org
Tue Jun 3 01:13:05 PDT 2014


#2324: v.to.rast: useless area warning on points-only maps
-------------------------+--------------------------------------------------
 Reporter:  neteler      |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Vector       |     Version:  svn-releasebranch70      
 Keywords:  v.to.rast    |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 There is a small issue which confuses (new) users a lot:

 {{{
 # rasterizing a map with only points:
 # GRASS 7.1.svn (nc_spm_08_grass7):~ >

 v.info -t geodetic_pts | grep 'points\|areas'
 points=29939
 areas=0

 # ... but there is an area related warning!:
 v.to.rast input=geodetic_pts output=test use=attr attr=GDC_ID
 WARNING: No areas selected from vector map <geodetic_pts>
 Reading features...
  100%
 Writing raster map...
  100%
 Converted points/lines: 29939 of 29939
 v.to.rast complete.
 }}}

 The issue is here:

 {{{
 vect2rast.c:

     Points = Vect_new_line_struct();

     if (use != USE_Z && use != USE_D && (ftype & GV_AREA)) {
         if ((nareas = sort_areas(&Map, Points, field, cat_list)) == 0)
             G_warning(_("No areas selected from vector map <%s>"),
                           vector_map);
 }}}

 but I don't know how to change the if() condition properly.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2324>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list