[GRASS-SVN] r56255 - grass/trunk/vector/v.to.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 15 00:46:18 PDT 2013
Author: hamish
Date: 2013-05-15 00:46:18 -0700 (Wed, 15 May 2013)
New Revision: 56255
Modified:
grass/trunk/vector/v.to.rast/support.c
Log:
update history, improve titles (merge from devbr6)
Modified: grass/trunk/vector/v.to.rast/support.c
===================================================================
--- grass/trunk/vector/v.to.rast/support.c 2013-05-15 07:39:21 UTC (rev 56254)
+++ grass/trunk/vector/v.to.rast/support.c 2013-05-15 07:46:18 UTC (rev 56255)
@@ -23,14 +23,13 @@
if (raster_name == NULL)
return (-1);
- if (Rast_read_history(raster_name, G_mapset(), &hist) < 0)
- return -1;
+ Rast_short_history(raster_name, "raster", &hist);
- Rast_set_history(&hist, HIST_TITLE, raster_name);
-
/* store information from digit file into history */
- Rast_format_history(&hist, HIST_DATSRC_1, "Vector Map: %s", vector_name);
- Rast_format_history(&hist, HIST_DATSRC_2, "Original scale from vector map: 1:%ld", scale); /* 4.0 */
+ Rast_format_history(&hist, HIST_DATSRC_1,
+ "Vector Map: %s", vector_name);
+ Rast_format_history(&hist, HIST_DATSRC_2,
+ "Original scale from vector map: 1:%ld", scale); /* 4.0 */
/* store command line options */
Rast_command_history(&hist);
@@ -274,7 +273,7 @@
break;
}
- Rast_set_cats_title("Labels", &rast_cats);
+ Rast_set_cats_title("Rasterized vector map from labels", &rast_cats);
/* open vector map and database driver */
Vect_set_open_level(1);
@@ -389,7 +388,7 @@
struct Range range;
map_type = Rast_map_type(rast_name, G_mapset());
- Rast_set_cats_title("Values", &rast_cats);
+ Rast_set_cats_title("Rasterized vector map from values", &rast_cats);
if (map_type == CELL_TYPE) {
CELL min, max;
@@ -425,7 +424,7 @@
if (label_column) {
- Rast_set_cats_title("Labels", &rast_cats);
+ Rast_set_cats_title("Rasterized vector map from labels", &rast_cats);
/* open vector map and database driver */
Vect_set_open_level(1);
@@ -513,7 +512,7 @@
rowbuf = Rast_allocate_buf(map_type);
Rast_init_cell_stats(&stats);
- Rast_set_cats_title("Categories", &rast_cats);
+ Rast_set_cats_title("Rasterized vector map from categories", &rast_cats);
rows = Rast_window_rows();
@@ -544,7 +543,8 @@
char msg[64];
map_type = Rast_map_type(rast_name, G_mapset());
- Rast_set_cats_title("Degrees", &rast_cats);
+ Rast_set_cats_title("Rasterized vector map from line direction", &rast_cats);
+ Rast_write_units(rast_name, "degrees CCW from +x");
for (i = 1; i <= 360; i++) {
sprintf(msg, "%d degrees", i);
More information about the grass-commit
mailing list