[GRASS-SVN] r69326 - grass/trunk/vector/v.to.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 31 17:37:04 PDT 2016
Author: wenzeslaus
Date: 2016-08-31 17:37:04 -0700 (Wed, 31 Aug 2016)
New Revision: 69326
Modified:
grass/trunk/vector/v.to.rast/local.h
grass/trunk/vector/v.to.rast/support.c
grass/trunk/vector/v.to.rast/vect2rast.c
Log:
v.to.rast: just leave the color table to be the default
Modified: grass/trunk/vector/v.to.rast/local.h
===================================================================
--- grass/trunk/vector/v.to.rast/local.h 2016-08-31 20:47:22 UTC (rev 69325)
+++ grass/trunk/vector/v.to.rast/local.h 2016-09-01 00:37:04 UTC (rev 69326)
@@ -43,11 +43,9 @@
/* support.c */
int update_hist(const char *, const char *, long);
-int update_colors(const char *);
int update_dbcolors(const char *, const char *, int, const char *, int, const char *);
int update_labels(const char *, const char *, int, const char *, int, int, const char *);
int update_cats(const char *);
-int update_fcolors(const char *);
/* vect2rast.c */
int vect_to_rast(const char *, const char *, const char *, const char *, int, int,
Modified: grass/trunk/vector/v.to.rast/support.c
===================================================================
--- grass/trunk/vector/v.to.rast/support.c 2016-08-31 20:47:22 UTC (rev 69325)
+++ grass/trunk/vector/v.to.rast/support.c 2016-09-01 00:37:04 UTC (rev 69326)
@@ -39,37 +39,6 @@
return 0;
}
-
-int update_colors(const char *raster_name)
-{
- struct Range range;
- struct Colors colors;
- CELL min, max;
-
- Rast_read_range(raster_name, G_mapset(), &range);
- Rast_get_range_min_max(&range, &min, &max);
- Rast_make_rainbow_colors(&colors, min, max);
- Rast_write_colors(raster_name, G_mapset(), &colors);
-
- return 0;
-}
-
-
-int update_fcolors(const char *raster_name)
-{
- struct FPRange range;
- struct Colors colors;
- DCELL min, max;
-
- Rast_read_fp_range(raster_name, G_mapset(), &range);
- Rast_get_fp_range_min_max(&range, &min, &max);
- Rast_make_rainbow_colors(&colors, (CELL) min, (CELL) max);
- Rast_write_colors(raster_name, G_mapset(), &colors);
-
- return 0;
-}
-
-
int update_cats(const char *raster_name)
{
/* TODO: maybe attribute transfer from vector map?
Modified: grass/trunk/vector/v.to.rast/vect2rast.c
===================================================================
--- grass/trunk/vector/v.to.rast/vect2rast.c 2016-08-31 20:47:22 UTC (rev 69325)
+++ grass/trunk/vector/v.to.rast/vect2rast.c 2016-09-01 00:37:04 UTC (rev 69326)
@@ -202,17 +202,12 @@
if (rgbcolumn) {
if (use != USE_ATTR && use != USE_CAT) {
G_warning(_("Color can be updated from database only if use=attr"));
- update_colors(raster_map);
}
else {
update_dbcolors(raster_map, vector_map, field, rgbcolumn, is_fp,
column);
}
}
- else if (use == USE_D)
- update_fcolors(raster_map);
- else
- update_colors(raster_map);
update_cats(raster_map);
More information about the grass-commit
mailing list