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

Dylan Beaudette dylan.beaudette at gmail.com
Mon Jan 22 13:29:12 EST 2007


On Monday 22 January 2007 07:28, Michael Barton wrote:
> Helena and others,
>
> The current v.to.rast syntax dates from the days of the old vector
> architecture, with some tweaking to allow it to use layers and attribute
> columns in the current architecture.
>
> IMHO, what would make more sense now is to have the following syntax:
>
> V.to.rast input=name output=name [cat=cat, column-name, auto] [label=cat,
> column-name] [layer=integer] [color=column-name, auto]... With various
> flags and defaults like we have now.
>
> "cat" would use the vector cat field to populate the cat or label field in
> the raster. This would be the default for the "cat=" option.
>
> "auto" would automatically generate a series of integers 1...n to populate
> the raster cat field.
>
> The raster label would have no default value, though the user could set it
> to the vector cat or any other column.
>
> The color= option would allow a user to specify a vector color column
> (originally GRASS_RGB) that contains color info (GRASS named colors or
> RRR:GGG:BBB) that would be used to create a color table for the resulting
> raster. "color=auto" would simply generate a color table automatically as
> is the case now and would be the default for this optoin.
>
> What do you think?
>
> Michael

Michael:

I almost forgot about automatic color rule generation! Great idea!

Dylan


> On 1/21/07 12:51 PM, "Helena Mitasova" <hmitaso at unity.ncsu.edu> 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/
>
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-dev mailing list