On Thu, May 3, 2012 at 12:49 AM, Rich Shepard <[email protected]> wrote: > On Thu, 3 May 2012, Markus Neteler wrote: > >> It is in the cats/ subdirectory. > > > Markus, > > Interesting: > > # 166 categories > Watershed basins > > 0.00 0.00 0.00 0.00 > dem.basin lines 1-4/4 (END) > > >> They are created if the raster maps has category labels (see >> r.category). > > > dem.basin: even numbers 2-166. > > >> GRASS 6.4.3svn (nc_spm_08):~ > v.db.select myzipcodes > > > v.db.select basinv > cat|value|label > 2|126| > 3|126| > 4|110| > 5|2| > 6|2| > 7|96| > 8|122| > 9|20| > 10|98| > 11|126| > 12|60| > 13|130| > 14|4| > 15|58| > 16|108| > 17|14| > 18|120| > 19|124| > 20|120| > > >> Maybe too late here, I don't get the last question. > > > Notice above from basinv: cats 2 and 3 have same value (but r.category > shows only even number cats for the raster version, dem.basin). Also cats 18 > and 20 have the same value. That's what I mean by my third question: why > more categories in the vector produced in r.to.vect than in the raster > source, and why duplicate values for different categories?
If you use r.to.vect without the -v flag, each area becomes a unique category and the raster value is stored in the column value. If you use r.to.vect with the -v flag, raster values are used as area categories. There are more areas than raster basins because e.g. the basin number 1 in 1 2 2 2 3 1 2 2 3 3 1 2 3 3 3 3 will be represented as 3 separate vector areas. Markus M _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
