[GRASS-SVN] r70643 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 20 06:10:24 PST 2017
Author: mmetz
Date: 2017-02-20 06:10:24 -0800 (Mon, 20 Feb 2017)
New Revision: 70643
Modified:
grass/trunk/lib/gis/ll_scan.c
Log:
libgis: relax ll restrictions when reading DMS coords
Modified: grass/trunk/lib/gis/ll_scan.c
===================================================================
--- grass/trunk/lib/gis/ll_scan.c 2017-02-20 14:09:12 UTC (rev 70642)
+++ grass/trunk/lib/gis/ll_scan.c 2017-02-20 14:10:24 UTC (rev 70643)
@@ -37,18 +37,20 @@
******************************************************************************/
#include <grass/gis.h>
+#define LL_TOLERANCE 10
+
static int scan_ll(const char *, const char *, double *, int);
static int check_minutes(const char *);
static int check_seconds(const char *);
int G_lat_scan(const char *buf, double *lat)
{
- return scan_ll(buf, "sn", lat, 90);
+ return scan_ll(buf, "sn", lat, 90 + LL_TOLERANCE);
}
int G_lon_scan(const char *buf, double *lon)
{
- return scan_ll(buf, "we", lon, 180);
+ return scan_ll(buf, "we", lon, 360 + LL_TOLERANCE);
}
int G_llres_scan(const char *buf, double *res)
More information about the grass-commit
mailing list