landam / grass-gis-git-migration-test

0 stars 0 forks source link

v.to.rast allow to use label_column alone #212

Open landam opened 5 years ago

landam commented 5 years ago

Reported by marisn on 27 Apr 2016 08:28 UTC 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.

GRASS GIS version and provenance

svn-trunk

Migrated-From: https://trac.osgeo.org/grass/ticket/3005

landam commented 5 years ago

Comment by neteler on 5 May 2016 14:08 UTC Milestone renamed

landam commented 5 years ago

Comment by mmetz on 9 May 2016 21:18 UTC Replying to [ticket:3005 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.

landam commented 5 years ago

Comment by neteler on 28 Dec 2016 15:04 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by @landam on 5 May 2017 20:41 UTC

landam commented 5 years ago

Comment by @landam on 1 Sep 2017 20:28 UTC All enhancement tickets should be assigned to 7.4 milestone.

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:53 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:08 UTC Ticket retargeted after milestone closed