|
@@ -1,15 +1,15 @@
|
|
|
/*!
|
|
|
- * \file gis/wind_scan.c
|
|
|
- *
|
|
|
- * \brief GIS Library - Window scanning functions.
|
|
|
- *
|
|
|
- * (C) 2001-2009 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.
|
|
|
- *
|
|
|
- * \author Original author CERL
|
|
|
- */
|
|
|
+ \file lib/gis/wind_scan.c
|
|
|
+
|
|
|
+ \brief GIS Library - Coordinate scanning functions.
|
|
|
+
|
|
|
+ (C) 2001-2009, 2011 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.
|
|
|
+
|
|
|
+ \author Original author CERL
|
|
|
+*/
|
|
|
|
|
|
#include <stdio.h>
|
|
|
#include <grass/gis.h>
|
|
@@ -17,18 +17,25 @@
|
|
|
static int scan_double(const char *, double *);
|
|
|
|
|
|
/*!
|
|
|
- * \brief ASCII northing to double.
|
|
|
- *
|
|
|
- * Converts the ASCII "northing" coordinate string in <i>buf</i> to its
|
|
|
- * double representation (into <i>northing</i>).
|
|
|
- *
|
|
|
- * \param buf buffer hold string northing
|
|
|
- * \param[out] northing northing
|
|
|
- * \param projection projection code
|
|
|
- *
|
|
|
- * \return 0 on error
|
|
|
- * \return 1 on success
|
|
|
- */
|
|
|
+ \brief ASCII northing to double.
|
|
|
+
|
|
|
+ Converts the ASCII "northing" coordinate string in <i>buf</i> to its
|
|
|
+ double representation (into <i>northing</i>).
|
|
|
+
|
|
|
+ Supported projection codes (see gis.h):
|
|
|
+ - PROJECTION_XY
|
|
|
+ - PROJECTION_UTM
|
|
|
+ - PROJECTION_SP
|
|
|
+ - PROJECTION_LL
|
|
|
+ - PROJECTION_OTHER
|
|
|
+
|
|
|
+ \param buf buffer hold string northing
|
|
|
+ \param[out] northing northing
|
|
|
+ \param projection projection code
|
|
|
+
|
|
|
+ \return 0 on error
|
|
|
+ \return 1 on success
|
|
|
+*/
|
|
|
int G_scan_northing(const char *buf, double *northing, int projection)
|
|
|
{
|
|
|
if (projection == PROJECTION_LL) {
|
|
@@ -44,18 +51,25 @@ int G_scan_northing(const char *buf, double *northing, int projection)
|
|
|
}
|
|
|
|
|
|
/*!
|
|
|
- * \brief ASCII easting to double.
|
|
|
- *
|
|
|
- * Converts the ASCII "easting" coordinate string in <i>buf</i> to its
|
|
|
- * double representation (into <i>easting</i>).
|
|
|
- *
|
|
|
- * \param buf buffer containing string easting
|
|
|
- * \param[out] easting easting
|
|
|
- * \param projection projection code
|
|
|
- *
|
|
|
- * \return 0 on error
|
|
|
- * \return 1 on success
|
|
|
- */
|
|
|
+ \brief ASCII easting to double.
|
|
|
+
|
|
|
+ Converts the ASCII "easting" coordinate string in <i>buf</i> to its
|
|
|
+ double representation (into <i>easting</i>).
|
|
|
+
|
|
|
+ Supported projection codes (see gis.h):
|
|
|
+ - PROJECTION_XY
|
|
|
+ - PROJECTION_UTM
|
|
|
+ - PROJECTION_SP
|
|
|
+ - PROJECTION_LL
|
|
|
+ - PROJECTION_OTHER
|
|
|
+
|
|
|
+ \param buf buffer containing string easting
|
|
|
+ \param[out] easting easting
|
|
|
+ \param projection projection code
|
|
|
+
|
|
|
+ \return 0 on error
|
|
|
+ \return 1 on success
|
|
|
+*/
|
|
|
int G_scan_easting(const char *buf, double *easting, int projection)
|
|
|
{
|
|
|
if (projection == PROJECTION_LL) {
|
|
@@ -75,18 +89,25 @@ int G_scan_easting(const char *buf, double *easting, int projection)
|
|
|
}
|
|
|
|
|
|
/*!
|
|
|
- * \brief ASCII resolution to double.
|
|
|
- *
|
|
|
- * Converts the ASCII "resolution" string in <i>buf</i> to its double
|
|
|
- * representation (into resolution).
|
|
|
- *
|
|
|
- * \param buf buffer containing string resolution
|
|
|
- * \param[out] resolution resolution value
|
|
|
- * \param projection projection code
|
|
|
- *
|
|
|
- * \return 0 on error
|
|
|
- * \return 1 on success
|
|
|
- */
|
|
|
+ \brief ASCII resolution to double.
|
|
|
+
|
|
|
+ Converts the ASCII "resolution" string in <i>buf</i> to its double
|
|
|
+ representation (into resolution).
|
|
|
+
|
|
|
+ Supported projection codes (see gis.h):
|
|
|
+ - PROJECTION_XY
|
|
|
+ - PROJECTION_UTM
|
|
|
+ - PROJECTION_SP
|
|
|
+ - PROJECTION_LL
|
|
|
+ - PROJECTION_OTHER
|
|
|
+
|
|
|
+ \param buf buffer containing string resolution
|
|
|
+ \param[out] resolution resolution value
|
|
|
+ \param projection projection code
|
|
|
+
|
|
|
+ \return 0 on error
|
|
|
+ \return 1 on success
|
|
|
+*/
|
|
|
int G_scan_resolution(const char *buf, double *res, int projection)
|
|
|
{
|
|
|
if (projection == PROJECTION_LL) {
|