[GRASS-SVN] r64026 - in grass/trunk/raster3d: r3.flow r3.gradient r3.in.ascii r3.in.bin r3.in.v5d r3.info r3.mask r3.mkdspf r3.neighbors r3.null r3.out.ascii r3.out.bin r3.out.netcdf r3.out.v5d r3.out.vtk r3.stats r3.support r3.timestamp
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 9 00:59:16 PST 2015
Author: neteler
Date: 2015-01-09 00:59:16 -0800 (Fri, 09 Jan 2015)
New Revision: 64026
Added:
grass/trunk/raster3d/r3.timestamp/main.c
Removed:
grass/trunk/raster3d/r3.timestamp/r3.timestamp.main.c
Modified:
grass/trunk/raster3d/r3.flow/main.c
grass/trunk/raster3d/r3.flow/test_main.c
grass/trunk/raster3d/r3.gradient/main.c
grass/trunk/raster3d/r3.in.ascii/main.c
grass/trunk/raster3d/r3.in.bin/main.c
grass/trunk/raster3d/r3.in.v5d/main.c
grass/trunk/raster3d/r3.info/main.c
grass/trunk/raster3d/r3.mask/main.c
grass/trunk/raster3d/r3.mkdspf/main.c
grass/trunk/raster3d/r3.neighbors/main.c
grass/trunk/raster3d/r3.null/main.c
grass/trunk/raster3d/r3.out.ascii/main.c
grass/trunk/raster3d/r3.out.bin/main.c
grass/trunk/raster3d/r3.out.netcdf/main.c
grass/trunk/raster3d/r3.out.v5d/main.c
grass/trunk/raster3d/r3.out.vtk/main.c
grass/trunk/raster3d/r3.stats/main.c
grass/trunk/raster3d/r3.support/main.c
Log:
r3.*: keyword standardization; minor compiler warnings fixed; use standard file name for main.c of r3.timestamp
Modified: grass/trunk/raster3d/r3.flow/main.c
===================================================================
--- grass/trunk/raster3d/r3.flow/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.flow/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -177,8 +177,8 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("hydrology"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("flowline"));
module->description =
_("Computes 3D flow lines and 3D flow accumulation.");
Modified: grass/trunk/raster3d/r3.flow/test_main.c
===================================================================
--- grass/trunk/raster3d/r3.flow/test_main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.flow/test_main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -41,8 +41,8 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("hydrology"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("flowline"));
module->description = _("Testing flow lines.");
test_opt = G_define_option();
Modified: grass/trunk/raster3d/r3.gradient/main.c
===================================================================
--- grass/trunk/raster3d/r3.gradient/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.gradient/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -41,8 +41,8 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("gradient"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("gradient"));
module->description =
_("Computes gradient of a 3D raster map "
"and outputs gradient components as three 3D raster maps.");
Modified: grass/trunk/raster3d/r3.in.ascii/main.c
===================================================================
--- grass/trunk/raster3d/r3.in.ascii/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.in.ascii/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -204,6 +204,7 @@
/*---------------------------------------------------------------------------*/
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
void
@@ -310,8 +311,8 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("import"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("import"));
G_add_keyword(_("conversion"));
G_add_keyword("ASCII");
module->description =
Modified: grass/trunk/raster3d/r3.in.bin/main.c
===================================================================
--- grass/trunk/raster3d/r3.in.bin/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.in.bin/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -251,6 +251,7 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("import"));
+ G_add_keyword(_("voxel"));
module->description =
_("Imports a binary raster file into a GRASS 3D raster map.");
Modified: grass/trunk/raster3d/r3.in.v5d/main.c
===================================================================
--- grass/trunk/raster3d/r3.in.v5d/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.in.v5d/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -34,6 +34,7 @@
#include <grass/raster3d.h>
#include <grass/glocale.h>
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
/*---------------------------------------------------------------------------*/
@@ -175,6 +176,7 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("import"));
G_add_keyword(_("voxel"));
module->description =
_("Import 3-dimensional Vis5D files.");
Modified: grass/trunk/raster3d/r3.info/main.c
===================================================================
--- grass/trunk/raster3d/r3.info/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.info/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -74,8 +74,8 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("metadata"));
+ G_add_keyword(_("voxel"));
G_add_keyword(_("extent"));
- G_add_keyword(_("voxel"));
module->description =
_("Outputs basic information about a user-specified 3D raster map layer.");
Modified: grass/trunk/raster3d/r3.mask/main.c
===================================================================
--- grass/trunk/raster3d/r3.mask/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.mask/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -41,6 +41,7 @@
/*-------------------------------------------------------------------------*/
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
static void makeMask(char *name, d_Mask * maskRules)
Modified: grass/trunk/raster3d/r3.mkdspf/main.c
===================================================================
--- grass/trunk/raster3d/r3.mkdspf/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.mkdspf/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -77,6 +77,7 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("display"));
G_add_keyword(_("voxel"));
module->description =
_("Creates a display file from an existing 3D raster map according to specified threshold levels.");
Modified: grass/trunk/raster3d/r3.neighbors/main.c
===================================================================
--- grass/trunk/raster3d/r3.neighbors/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.neighbors/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -207,6 +207,7 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("algebra"));
+ G_add_keyword(_("voxel"));
G_add_keyword(_("statistics"));
G_add_keyword(_("aggregation"));
G_add_keyword(_("neighbor"));
Modified: grass/trunk/raster3d/r3.null/main.c
===================================================================
--- grass/trunk/raster3d/r3.null/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.null/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -24,6 +24,7 @@
#include <grass/glocale.h>
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
@@ -183,6 +184,7 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("null data"));
G_add_keyword(_("voxel"));
module->description =
_("Explicitly create the 3D NULL-value bitmap file.");
Modified: grass/trunk/raster3d/r3.out.ascii/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.ascii/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.out.ascii/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -23,6 +23,7 @@
#include <grass/raster3d.h>
#include <grass/glocale.h>
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
/* structs */
@@ -299,8 +300,8 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("export"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("export"));
G_add_keyword(_("conversion"));
G_add_keyword("ASCII");
module->description =
Modified: grass/trunk/raster3d/r3.out.bin/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.bin/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.out.bin/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -204,6 +204,7 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("export"));
+ G_add_keyword(_("voxel"));
module->description = _("Exports a GRASS 3D raster map to a binary array.");
/* Define the different options */
Modified: grass/trunk/raster3d/r3.out.netcdf/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.netcdf/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.out.netcdf/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -586,6 +586,7 @@
G_add_keyword(_("raster3d"));
G_add_keyword(_("export"));
G_add_keyword(_("netCDF"));
+ G_add_keyword(_("voxel"));
module->description = _("Export a 3D raster map as netCDF file.");
/* Get parameters from user */
Modified: grass/trunk/raster3d/r3.out.v5d/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.v5d/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.out.v5d/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -23,6 +23,7 @@
#include <grass/raster3d.h>
#include <grass/glocale.h>
+#undef MAX
#define MAX(a,b) (a > b ? a : b)
/* structs */
@@ -281,8 +282,8 @@
G_gisinit(argv[0]);
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("export"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("export"));
module->description =
_("Exports GRASS 3D raster map to 3-dimensional Vis5D file.");
Modified: grass/trunk/raster3d/r3.out.vtk/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.vtk/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.out.vtk/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -374,8 +374,8 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
+ G_add_keyword(_("export"));
G_add_keyword(_("voxel"));
- G_add_keyword(_("export"));
G_add_keyword("VTK");
module->description =
_("Converts 3D raster maps into the VTK-ASCII format.");
Modified: grass/trunk/raster3d/r3.stats/main.c
===================================================================
--- grass/trunk/raster3d/r3.stats/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.stats/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -47,6 +47,7 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("statistics"));
+ G_add_keyword(_("voxel"));
module->description = _("Generates volume statistics for 3D raster maps.");
/* Define the different options */
Modified: grass/trunk/raster3d/r3.support/main.c
===================================================================
--- grass/trunk/raster3d/r3.support/main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.support/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -48,8 +48,9 @@
module = G_define_module();
G_add_keyword(_("raster3d"));
G_add_keyword(_("metadata"));
+ G_add_keyword(_("voxel"));
module->description = _("Allows creation and/or modification of "
- "raster3d map layer support files.");
+ "3D raster map layer support files.");
raster = G_define_standard_option(G_OPT_R3_MAP);
Copied: grass/trunk/raster3d/r3.timestamp/main.c (from rev 63994, grass/trunk/raster3d/r3.timestamp/r3.timestamp.main.c)
===================================================================
--- grass/trunk/raster3d/r3.timestamp/main.c (rev 0)
+++ grass/trunk/raster3d/r3.timestamp/main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -0,0 +1,93 @@
+
+/****************************************************************************
+ *
+ * MODULE: r3.timestamp
+ * AUTHOR(S): Michael Pelizzari <michael.pelizzari lmco.com>
+ * (original contributor)
+ * Glynn Clements <glynn gclements.plus.com> Markus Neteler <neteler itc.it>
+ * PURPOSE: Stamps raster3d files with date and time.
+ * COPYRIGHT: (C) 2001-2006 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ *****************************************************************************/
+
+/* based on r.timestamp by Michael Shapiro and v.timestamp by Markus Neteler:
+ *
+ * Stamps raster3d files with date and time. This main.c is linked to functions
+ * currently residing in lib/gis/timestamp.c
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <grass/gis.h>
+#include <grass/raster3d.h>
+#include <grass/glocale.h>
+
+int main(int argc, char *argv[])
+{
+ struct Option *map, *date;
+ struct TimeStamp ts;
+ char *name;
+ const char *mapset;
+ int modify;
+ struct GModule *module;
+
+ G_gisinit(argv[0]);
+
+ module = G_define_module();
+ G_add_keyword(_("raster3d"));
+ G_add_keyword(_("timestamp"));
+ G_add_keyword(_("voxel"));
+ module->description =
+ _("Print/add/remove a timestamp for a 3D raster map");
+
+ map = G_define_standard_option(G_OPT_R3_MAP);
+
+ date = G_define_option();
+ date->key = "date";
+ date->key_desc = "timestamp";
+ date->required = NO;
+ date->type = TYPE_STRING;
+ date->description = _("Datetime, datetime1/datetime2, or none");
+
+ if (G_parser(argc, argv))
+ exit(EXIT_FAILURE);
+
+ name = map->answer;
+
+ modify = date->answer != NULL;
+
+ if (modify)
+ mapset = G_find_raster3d(name, G_mapset());
+ else
+ mapset = G_find_raster3d(name, "");
+
+ if (mapset == NULL) {
+ G_fatal_error(_("3D raster map <%s> not found"), name);
+ exit(EXIT_FAILURE);
+ }
+
+ if (!modify) {
+ if (G_read_raster3d_timestamp(name, mapset, &ts) == 1) {
+ G_write_timestamp(stdout, &ts);
+ exit(EXIT_SUCCESS);
+ }
+ else
+ exit(EXIT_FAILURE);
+ }
+ if (strcmp(date->answer, "none") == 0) {
+ G_remove_raster3d_timestamp(name);
+ exit(EXIT_SUCCESS);
+ }
+
+ if(G_scan_timestamp(&ts, date->answer) != 1)
+ G_fatal_error(_("Timestamp format is invalid"));
+
+ G_write_raster3d_timestamp(name, &ts);
+ exit(EXIT_SUCCESS);
+}
Deleted: grass/trunk/raster3d/r3.timestamp/r3.timestamp.main.c
===================================================================
--- grass/trunk/raster3d/r3.timestamp/r3.timestamp.main.c 2015-01-09 08:37:34 UTC (rev 64025)
+++ grass/trunk/raster3d/r3.timestamp/r3.timestamp.main.c 2015-01-09 08:59:16 UTC (rev 64026)
@@ -1,92 +0,0 @@
-
-/****************************************************************************
- *
- * MODULE: r3.timestamp
- * AUTHOR(S): Michael Pelizzari <michael.pelizzari lmco.com>
- * (original contributor)
- * Glynn Clements <glynn gclements.plus.com> Markus Neteler <neteler itc.it>
- * PURPOSE: Stamps raster3d files with date and time.
- * COPYRIGHT: (C) 2001-2006 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
- *
- *****************************************************************************/
-
-/* based on r.timestamp by Michael Shapiro and v.timestamp by Markus Neteler:
- *
- * Stamps raster3d files with date and time. This main.c is linked to functions
- * currently residing in lib/gis/timestamp.c
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <grass/gis.h>
-#include <grass/raster3d.h>
-#include <grass/glocale.h>
-
-int main(int argc, char *argv[])
-{
- struct Option *map, *date;
- struct TimeStamp ts;
- char *name;
- const char *mapset;
- int modify;
- struct GModule *module;
-
- G_gisinit(argv[0]);
-
- module = G_define_module();
- G_add_keyword(_("raster3d"));
- G_add_keyword(_("voxel"));
- module->description =
- _("Print/add/remove a timestamp for a 3D raster map");
-
- map = G_define_standard_option(G_OPT_R3_MAP);
-
- date = G_define_option();
- date->key = "date";
- date->key_desc = "timestamp";
- date->required = NO;
- date->type = TYPE_STRING;
- date->description = _("Datetime, datetime1/datetime2, or none");
-
- if (G_parser(argc, argv))
- exit(EXIT_FAILURE);
-
- name = map->answer;
-
- modify = date->answer != NULL;
-
- if (modify)
- mapset = G_find_raster3d(name, G_mapset());
- else
- mapset = G_find_raster3d(name, "");
-
- if (mapset == NULL) {
- G_fatal_error(_("3D raster map <%s> not found"), name);
- exit(EXIT_FAILURE);
- }
-
- if (!modify) {
- if (G_read_raster3d_timestamp(name, mapset, &ts) == 1) {
- G_write_timestamp(stdout, &ts);
- exit(EXIT_SUCCESS);
- }
- else
- exit(EXIT_FAILURE);
- }
- if (strcmp(date->answer, "none") == 0) {
- G_remove_raster3d_timestamp(name);
- exit(EXIT_SUCCESS);
- }
-
- if(G_scan_timestamp(&ts, date->answer) != 1)
- G_fatal_error(_("Timestamp format is invalid"));
-
- G_write_raster3d_timestamp(name, &ts);
- exit(EXIT_SUCCESS);
-}
More information about the grass-commit
mailing list