Opened 9 years ago
Last modified 6 years ago
#3005 new enhancement
v.to.rast allow to use label_column alone
Reported by: | marisn | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 7.6.2 |
Component: | Vector | Version: | svn-trunk |
Keywords: | v.to.rast | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
At the moment v.to.rast only supports label_column together with attr_column. It makes perfect sense, still misses one use case - when attr_column is absent and only labels are present. I.e. when attribute table contains land use labels but not class codes.
Proposal is to generate codes on the fly if only label column is provided.
How it could work: select labelcolumn from db distinct; Enumerate output rows; Use row number as a raster category.
Change History (10)
comment:1 by , 9 years ago
Milestone: | 7.1.0 → 7.2.0 |
---|
comment:2 by , 9 years ago
Replying to marisn:
At the moment v.to.rast only supports label_column together with attr_column. It makes perfect sense, still misses one use case - when attr_column is absent and only labels are present. I.e. when attribute table contains land use labels but not class codes.
Proposal is to generate codes on the fly if only label column is provided.
How it could work: select labelcolumn from db distinct; Enumerate output rows; Use row number as a raster category.
You can use v.reclass + v.to.rast, e.g. with the NC dataset
v.reclass in=soils_general@PERMANENT out=soils_reclass layer=1 column=GSL_NAME g.region -pa vect=soils_reclass res=100 v.to.rast in=soils_reclass layer=1 use=cat label_column=GSL_NAME
or write a script that does the above for any given vector and label column for general use.
comment:4 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:5 by , 7 years ago
Milestone: | 7.2.2 → 7.4.0 |
---|
All enhancement tickets should be assigned to 7.4 milestone.
comment:7 by , 6 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:8 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
Milestone renamed