[GRASS-SVN] r53141 - grass/trunk/vector/v.to.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 9 04:20:37 PDT 2012
Author: mmetz
Date: 2012-09-09 04:20:37 -0700 (Sun, 09 Sep 2012)
New Revision: 53141
Modified:
grass/trunk/vector/v.to.rast/support.c
Log:
v.to.rast: respect output map type
Modified: grass/trunk/vector/v.to.rast/support.c
===================================================================
--- grass/trunk/vector/v.to.rast/support.c 2012-09-09 11:15:37 UTC (rev 53140)
+++ grass/trunk/vector/v.to.rast/support.c 2012-09-09 11:20:37 UTC (rev 53141)
@@ -421,6 +421,8 @@
RASTER_MAP_TYPE map_type;
long count;
+ map_type = Rast_map_type(rast_name, G_mapset());
+
if (label_column) {
Rast_set_cats_title("Labels", &rast_cats);
@@ -499,17 +501,15 @@
/* add the raster category to label */
my_labels_rules[i].i = cat;
- Rast_set_c_cat(&(my_labels_rules[i].i),
+ Rast_set_cat(&(my_labels_rules[i].i),
&(my_labels_rules[i].i),
db_get_string(&my_labels_rules[i].label),
- &rast_cats);
+ &rast_cats, map_type);
} /* for each value in database */
}
else {
fd = Rast_open_old(rast_name, G_mapset());
- map_type = Rast_map_type(rast_name, G_mapset());
-
rowbuf = Rast_allocate_buf(map_type);
Rast_init_cell_stats(&stats);
More information about the grass-commit
mailing list