[GRASS-dev] [GRASS GIS] #1124: v.to.rast inconsistency in importing label

GRASS GIS trac at osgeo.org
Mon Aug 2 18:40:41 EDT 2010


#1124: v.to.rast inconsistency in importing label
----------------------+-----------------------------------------------------
 Reporter:  cmbarton  |       Owner:  grass-dev@…              
     Type:  defect    |      Status:  new                      
 Priority:  major     |   Milestone:  6.4.0                    
Component:  Raster    |     Version:  svn-develbranch6         
 Keywords:            |    Platform:  All                      
      Cpu:  All       |  
----------------------+-----------------------------------------------------
 We just ran into a strange inconsistency in the behavior of v.to.rast.
 This happens if you are trying to use vector attributes to populate the
 cat and label fields of a new raster.

 If you have a float (double precision) attribute to use for the raster cat
 and string attribute to use for the raster label, the float is imported
 into the raster cat fine. But the string is imported from the vector
 attribute to the raster label ONLY if the value in the corresponding
 attribute to use for the cat has no decimals. For example:

 here is a vector attribute table with 2 attributes and 4 records:


 {{{
 float_attr     str_attr
 =========     =======
 1.5           "first line"
 2             "second line"
 2.5           "third line"
 3             "fourth line"
 }}}


 v.to.rast is run as follows:

 v.to.rast input=vectorfile output=newraster use=attr type=point
 column=floatattr labelcolumn=strattr

 The result is that raster cells with values 2 and 3 have labels, but the
 cells with values 1.5 and 2.5 do not have labels.

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



More information about the grass-dev mailing list