15 #include <grass/gis.h> 17 static int scan_double(
const char *,
double *);
40 if (projection == PROJECTION_LL) {
43 if (!scan_double(buf, northing))
46 return (*northing <= 90.0 && *northing >= -90.0);
49 return scan_double(buf, northing);
73 if (projection == PROJECTION_LL) {
76 if (!scan_double(buf, easting))
78 while (*easting > 180.0)
80 while (*easting < -180.0)
86 return scan_double(buf, easting);
110 if (projection == PROJECTION_LL) {
115 return (scan_double(buf, res) && *res > 0.0);
118 static int scan_double(
const char *buf,
double *value)
128 if (sscanf(buf,
"%lf%1s", value, junk) == 1 && *junk == 0) {
133 if (*buf >=
'A' && *buf <=
'Z')
135 if (*buf >=
'a' && *buf <=
'z')
int G_scan_resolution(const char *buf, double *res, int projection)
ASCII resolution to double.
int G_lat_scan(const char *buf, double *lat)
int G_scan_northing(const char *buf, double *northing, int projection)
ASCII northing to double.
int G_llres_scan(const char *buf, double *res)
int G_scan_easting(const char *buf, double *easting, int projection)
ASCII easting to double.
int G_lon_scan(const char *buf, double *lon)