[GRASS-SVN] r49542 -
grass/branches/releasebranch_6_4/vector/v.to.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 5 05:01:45 EST 2011
Author: martinl
Date: 2011-12-05 02:01:45 -0800 (Mon, 05 Dec 2011)
New Revision: 49542
Modified:
grass/branches/releasebranch_6_4/vector/v.to.rast/support.c
grass/branches/releasebranch_6_4/vector/v.to.rast/vect2rast.c
Log:
v.to.rast: allow `use=cat rgbcolumn=column`
enable warning when rasterization is done
(merge r49541 from devbr6)
Modified: grass/branches/releasebranch_6_4/vector/v.to.rast/support.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.to.rast/support.c 2011-12-05 09:59:57 UTC (rev 49541)
+++ grass/branches/releasebranch_6_4/vector/v.to.rast/support.c 2011-12-05 10:01:45 UTC (rev 49542)
@@ -131,6 +131,9 @@
G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
Fi->database, Fi->driver);
+ if (!attr_column)
+ attr_column = Fi->key;
+
/* get number of records in attr_column */
if ((nrec =
db_select_CatValArray(Driver, Fi->table, Fi->key, attr_column, NULL,
Modified: grass/branches/releasebranch_6_4/vector/v.to.rast/vect2rast.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.to.rast/vect2rast.c 2011-12-05 09:59:57 UTC (rev 49541)
+++ grass/branches/releasebranch_6_4/vector/v.to.rast/vect2rast.c 2011-12-05 10:01:45 UTC (rev 49542)
@@ -184,6 +184,7 @@
stat = output_raster(fd);
} while (stat == 0);
+ G_suppress_warnings(0);
/* stat: 0 == repeat; 1 == done; -1 == error; */
Vect_destroy_line_struct(Points);
@@ -202,13 +203,14 @@
/* colors */
if (rgbcolumn) {
- if (use != USE_ATTR) {
+ if (use != USE_ATTR && use != USE_CAT) {
G_warning(_("Color can be updated from database only if use=attr"));
update_colors(raster_map);
}
-
- update_dbcolors(raster_map, vector_map, field, rgbcolumn, is_fp,
- column);
+ else {
+ update_dbcolors(raster_map, vector_map, field, rgbcolumn, is_fp,
+ column);
+ }
}
else if (use == USE_D)
update_fcolors(raster_map);
More information about the grass-commit
mailing list