Pārlūkot izejas kodu

v.to.rast: respect output map type

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53141 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 gadi atpakaļ
vecāks
revīzija
0fc5383e07
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      vector/v.to.rast/support.c

+ 4 - 4
vector/v.to.rast/support.c

@@ -421,6 +421,8 @@ int update_labels(const char *rast_name, const char *vector_map, int field,
 	    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 @@ int update_labels(const char *rast_name, const char *vector_map, int field,
 		    /* 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);