18 #include <grass/gis.h>
21 static int scan_double(
const char *,
double *);
39 if (projection == PROJECTION_LL) {
42 if (!scan_double(buf, northing))
45 return (*northing <= 90.0 && *northing >= -90.0);
48 return scan_double(buf, northing);
67 if (projection == PROJECTION_LL) {
70 if (!scan_double(buf, easting))
72 while (*easting > 180.0)
74 while (*easting < -180.0)
80 return scan_double(buf, easting);
99 if (projection == PROJECTION_LL) {
104 return (scan_double(buf, res) && *res > 0.0);
108 static int scan_double(
const char *
buf,
double *
value)
118 if (sscanf(buf,
"%lf%1s", value, junk) == 1 && *junk == 0) {
123 if (*buf >=
'A' && *buf <=
'Z')
125 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)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
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)