[GRASS-SVN] r47492 - grass/trunk/display/d.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 7 15:51:52 EDT 2011
Author: martinl
Date: 2011-08-07 12:51:52 -0700 (Sun, 07 Aug 2011)
New Revision: 47492
Modified:
grass/trunk/display/d.vect/lines.c
grass/trunk/display/d.vect/main.c
Log:
d.vect: -z flag works for all vector types
Modified: grass/trunk/display/d.vect/lines.c
===================================================================
--- grass/trunk/display/d.vect/lines.c 2011-08-07 19:23:28 UTC (rev 47491)
+++ grass/trunk/display/d.vect/lines.c 2011-08-07 19:51:52 UTC (rev 47492)
@@ -76,9 +76,13 @@
G_warning(_("Unable to display lines by id, topology not available. "
"Please try to rebuild topology using "
"v.build or v.build.all."));
- return 1;
}
+ if (z_color_flag && !Vect_is_3d(Map)) {
+ G_warning(_("Vector map is not 3D. Unable to colorize features based on z-coordinates."));
+ z_color_flag = 0;
+ }
+
var_size = size;
rotation = 0.0;
nerror_rgb = 0;
@@ -191,7 +195,7 @@
}
/* z height colors */
- if (z_color_flag && Vect_is_3d(Map)) {
+ if (z_color_flag) {
struct bound_box box;
double zval;
struct Colors colors;
Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c 2011-08-07 19:23:28 UTC (rev 47491)
+++ grass/trunk/display/d.vect/main.c 2011-08-07 19:51:52 UTC (rev 47492)
@@ -355,7 +355,7 @@
zcol_flag = G_define_flag();
zcol_flag->key = 'z';
- zcol_flag->description = _("Colorize polygons according to z height");
+ zcol_flag->description = _("Colorize features according to z-coordinate");
zcol_flag->guisection = _("Colors");
sqrt_flag = G_define_flag();
@@ -525,13 +525,14 @@
D_save_command(G_recreate_command());
D_close_driver();
- G_done_msg(" ");
-
Vect_close(&Map);
Vect_destroy_cat_list(Clist);
- if (stat != 0)
+ if (stat != 0) {
+ G_fatal_error(_("Rendering failed"));
exit(EXIT_FAILURE);
-
+ }
+
+ G_done_msg(" ");
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list