[GRASS-dev] issue v.to.rast - missing raster labels

Hi devs,

Converting a vector to raster does in some specific cases yields yields issues with the labeling. E.g., the following (example from NC dataset) results in a layer with each raster cells assigned a category label (the name of the municipality):

v.to.rast input=boundary_municp output=A01 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

Running the following will give a raster in which a portion of the cells do not have a label.

v.extract input=boundary_county where="NAME='WAKE'" output=WakeCounty

v.overlay ainput=boundary_municp binput=WakeCounty operator=and output=WakeMunicp olayer=0,1,0

g.region vector=WakeMunicp res=100 -a

v.to.rast input=WakeMunicp output=A02 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

I also tried:

v.extract input=boundary_municp where="COUNTY='WAKE'" output=WakeMunicp2

g.region vector=WakeMunicp2 res=100 -a

v.to.rast input=WakeMunicp2 output=A03 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

Same results, some of the raster cells do not get a label. I guess I am overlooking something here, but I can't figure out what goes wrong here. Any ideas?

Regards

Paulo

On 18-04-17 09:32, Paulo van Breugel wrote:

Hi devs,

Converting a vector to raster does in some specific cases yields yields issues with the labeling. E.g., the following (example from NC dataset) results in a layer with each raster cells assigned a category label (the name of the municipality):

v.to.rast input=boundary_municp output=A01 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

Running the following will give a raster in which a portion of the cells do not have a label.

v.extract input=boundary_county where="NAME='WAKE'" output=WakeCounty

v.overlay ainput=boundary_municp binput=WakeCounty operator=and output=WakeMunicp olayer=0,1,0

g.region vector=WakeMunicp res=100 -a

v.to.rast input=WakeMunicp output=A02 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

I also tried:

v.extract input=boundary_municp where="COUNTY='WAKE'" output=WakeMunicp2

g.region vector=WakeMunicp2 res=100 -a

v.to.rast input=WakeMunicp2 output=A03 use=attr attribute_column=OBJECTID label_column=MB_NAME type=area

Same results, some of the raster cells do not get a label. I guess I am overlooking something here, but I can't figure out what goes wrong here. Any ideas?

Addition info, if I look at the cats file in ~/nc_spm_08_grass7/user1/cats of A02 or A03 (created earlier, see above), there are a number or rows that look like e.g.,:

992:996:Morrisville

The same category values in the cats file of A01 are:

992:Morrisville
994:Lexington
996:Morrisville

Regards

Paulo