[GRASS-SVN] r62733 - grass/trunk/vector/v.neighbors
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 14 03:37:52 PST 2014
Author: neteler
Date: 2014-11-14 03:37:52 -0800 (Fri, 14 Nov 2014)
New Revision: 62733
Modified:
grass/trunk/vector/v.neighbors/main.c
Log:
v.neighbors: more informative error message
Modified: grass/trunk/vector/v.neighbors/main.c
===================================================================
--- grass/trunk/vector/v.neighbors/main.c 2014-11-14 09:31:04 UTC (rev 62732)
+++ grass/trunk/vector/v.neighbors/main.c 2014-11-14 11:37:52 UTC (rev 62733)
@@ -36,7 +36,7 @@
struct Option *in_opt, *out_opt, *field_opt;
struct Option *method_opt, *size_opt;
struct Map_info In;
- double radius;
+ double radius, raster_res;
struct boxlist *List;
struct Cell_head region;
struct bound_box box;
@@ -156,8 +156,13 @@
Vect_close(&In);
Rast_close(out_fd);
- if (count_sum < 1)
- G_warning(_("No points found"));
+ if (count_sum < 1) {
+ raster_res = (region.ew_res + region.ns_res)/2.;
+ G_warning(_("No points found (using raster resolution: %.1f, moving window size: %.1f)"),
+ raster_res, (box.E - box.W) * raster_res );
+ G_message(_("You can calculate the distance statistics between the vector point using:\nv.univar -d %s"), in_opt->answer);
+ exit(EXIT_FAILURE);
+ }
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list