[GRASS-dev] v.to.rast with category label support

Dylan Beaudette debeaudette at ucdavis.edu
Mon Jan 22 01:29:30 EST 2007


On Sunday 21 January 2007 11:51, Helena Mitasova wrote:
> While working on a replacement data set for spearfish
> I found that when we convert from vector data to raster there is no
> option to add labels
> so it needs to be done manually after the conversion.
> But there is only r.support to do that and it would be hard to use if
> you have
> large number of categories and it is practically unusable if the
> category numbers are large (e.g. I have only 5 zipcodes ranging from
> 27511 - 27606
> and r.support wants me to start with category 1).
>
> I rarely have to use this for my research work and if it is needed
> I just edit the cat file, but that is not a good solution.
>
> currently we have:
> v.to.rast input=name output=name [use=string] [column=name]
> [layer=integer] [value=float]
>
> would it be possible to add
> uselabel= with options at least: attr,cat, although some people may
> find the others useful: val,z,dir
> column= this one does not have to be numeric for labels
>
> Or is there any other way how to handle the raster map cat labels
> that I am missing?
>
> Helena
>
> P.S. Markus, Brad I am posting this to the list as it involves vector
> data conversion
> rather than just import.
>
>
> Helena Mitasova
> Dept. of Marine, Earth and Atm. Sciences
> 1125 Jordan Hall, NCSU Box 8208,
> Raleigh NC 27695
> http://skagit.meas.ncsu.edu/~helena/
>
>
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

Hi everyone,

This is something that has stumped me in the past as well. I work a lot with 
soils data and classified vegetation maps: i.e. lots of labels to worry about  
that often do not start with small numbers. 

Thus far I have used r.support to _manually_ add labels to raster created with 
r.to.vect ... However I noticed that even though my labels do not start at 
cat = 1, when using d.rast.leg i see all cats from 1 to maximum cat value. 
This is a problem when your labels correspond only to cats 55, 56, 57, 58, 
etc. This is not quite the same as what Helena mentioned, but I think that it 
is related. 

Although I am not in a position to fix this problem, I thought that I would 
chime in with my observations.

cheers,


-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341




More information about the grass-dev mailing list