[GRASS-SVN] r60415 - in grass/branches/releasebranch_7_0: include/defs lib/gis misc/m.measure raster/r.surf.area vector/v.to.db
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 22 08:08:04 PDT 2014
Author: hcho
Date: 2014-05-22 08:08:04 -0700 (Thu, 22 May 2014)
New Revision: 60415
Modified:
grass/branches/releasebranch_7_0/include/defs/gis.h
grass/branches/releasebranch_7_0/lib/gis/units.c
grass/branches/releasebranch_7_0/misc/m.measure/main.c
grass/branches/releasebranch_7_0/raster/r.surf.area/area.c
grass/branches/releasebranch_7_0/vector/v.to.db/units.c
Log:
libgis, r.surf.area, v.to.db, m.measure: Renamed G_units_to_meters_factor* to G_meters_to_units_factor* (merge from r60414)
Modified: grass/branches/releasebranch_7_0/include/defs/gis.h
===================================================================
--- grass/branches/releasebranch_7_0/include/defs/gis.h 2014-05-22 15:00:16 UTC (rev 60414)
+++ grass/branches/releasebranch_7_0/include/defs/gis.h 2014-05-22 15:08:04 UTC (rev 60415)
@@ -662,8 +662,8 @@
void G_trim_decimal(char *);
/* units.c */
-double G_units_to_meters_factor(int);
-double G_units_to_meters_factor_sq(int);
+double G_meters_to_units_factor(int);
+double G_meters_to_units_factor_sq(int);
const char *G_get_units_name(int, int, int);
int G_units(const char *);
int G_is_units_type_spatial(int);
Modified: grass/branches/releasebranch_7_0/lib/gis/units.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/units.c 2014-05-22 15:00:16 UTC (rev 60414)
+++ grass/branches/releasebranch_7_0/lib/gis/units.c 2014-05-22 15:08:04 UTC (rev 60415)
@@ -19,7 +19,7 @@
#include <grass/glocale.h>
/*!
- \brief Units conversion to meters
+ \brief Units conversion from meters to units
Units codes (gis.h):
- U_METERS
@@ -27,14 +27,13 @@
- U_MILES
- U_FEET
- Returns a factor which converts the grid unit to meters (by
- multiplication).
+ Returns a factor which converts meters to units (by multiplication).
\param units units code
\return factor
*/
-double G_units_to_meters_factor(int units)
+double G_meters_to_units_factor(int units)
{
switch (units) {
case U_METERS:
@@ -62,7 +61,7 @@
}
/*!
- \brief Units conversion to square meters
+ \brief Units conversion from square meters to square units
Units codes (gis.h):
- U_METERS
@@ -72,14 +71,14 @@
- U_MILES
- U_FEET
- Returns a factor which converts the grid unit to square meters (by
+ Returns a factor which converts square meters to square units (by
multiplication).
\param units units code
\return factor
*/
-double G_units_to_meters_factor_sq(int units)
+double G_meters_to_units_factor_sq(int units)
{
switch (units) {
case U_METERS:
Modified: grass/branches/releasebranch_7_0/misc/m.measure/main.c
===================================================================
--- grass/branches/releasebranch_7_0/misc/m.measure/main.c 2014-05-22 15:00:16 UTC (rev 60414)
+++ grass/branches/releasebranch_7_0/misc/m.measure/main.c 2014-05-22 15:08:04 UTC (rev 60415)
@@ -82,8 +82,8 @@
units_name = G_get_units_name(G_units(units->answer), 1, 0);
sq_units_name = G_get_units_name(G_units(units->answer), 1, 1);
}
- f = G_units_to_meters_factor(G_units(units->answer));
- sq_f = G_units_to_meters_factor_sq(G_units(units->answer));
+ f = G_meters_to_units_factor(G_units(units->answer));
+ sq_f = G_meters_to_units_factor_sq(G_units(units->answer));
G_debug(1, "using '%s (%f) %s (%f)'",
units_name, f, sq_units_name, sq_f);
Modified: grass/branches/releasebranch_7_0/raster/r.surf.area/area.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.surf.area/area.c 2014-05-22 15:00:16 UTC (rev 60414)
+++ grass/branches/releasebranch_7_0/raster/r.surf.area/area.c 2014-05-22 15:08:04 UTC (rev 60415)
@@ -120,5 +120,5 @@
if (units == U_UNDEFINED)
return value;
- return value * G_units_to_meters_factor_sq(units);
+ return value * G_meters_to_units_factor_sq(units);
}
Modified: grass/branches/releasebranch_7_0/vector/v.to.db/units.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.db/units.c 2014-05-22 15:00:16 UTC (rev 60414)
+++ grass/branches/releasebranch_7_0/vector/v.to.db/units.c 2014-05-22 15:08:04 UTC (rev 60415)
@@ -7,8 +7,8 @@
double f, sq_f;
rad = 0;
- f = G_units_to_meters_factor(options.units);
- sq_f = G_units_to_meters_factor_sq(options.units);
+ f = G_meters_to_units_factor(options.units);
+ sq_f = G_meters_to_units_factor_sq(options.units);
if (options.units == U_RADIANS)
rad = 1;
More information about the grass-commit
mailing list