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

GRASS GIS trac at osgeo.org
Tue Jun 3 08:12:57 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  |  
-------------------------+--------------------------------------------------

Comment(by hcho):

 IMO, type=point,line,area means to select those types only if they are
 valid type in the input map. If a map is point only, type=line,area should
 be ignored and no warnings about areas should be printed.

 {{{
 int sort_areas(...)
 {
 ...
     nareas = Vect_get_num_areas(Map);
     if (nareas == 0)
         return -1;
 ...
 }

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

             G_debug(1, "%d areas sorted", nareas);
         } /* else map with no areas */
     }
 ...
 }
 }}}

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



More information about the grass-dev mailing list