[GRASS-SVN] r70646 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 20 06:22:31 PST 2017


Author: mmetz
Date: 2017-02-20 06:22:31 -0800 (Mon, 20 Feb 2017)
New Revision: 70646

Modified:
   grass/trunk/lib/gis/wind_scan.c
Log:
libgis: G_scan_easting/G_scan_northing: limits are already checked in G_lon_scan/G_lat_scan

Modified: grass/trunk/lib/gis/wind_scan.c
===================================================================
--- grass/trunk/lib/gis/wind_scan.c	2017-02-20 14:18:21 UTC (rev 70645)
+++ grass/trunk/lib/gis/wind_scan.c	2017-02-20 14:22:31 UTC (rev 70646)
@@ -38,12 +38,10 @@
 int G_scan_northing(const char *buf, double *northing, int projection)
 {
     if (projection == PROJECTION_LL) {
-	if (G_lat_scan(buf, northing))
-	    return 1;
 	if (!scan_double(buf, northing))
-	    return 0;
+	    return G_lat_scan(buf, northing);
 
-	return (*northing <= 90.0 && *northing >= -90.0);
+	return 1;
     }
 
     return scan_double(buf, northing);
@@ -71,14 +69,8 @@
 int G_scan_easting(const char *buf, double *easting, int projection)
 {
     if (projection == PROJECTION_LL) {
-	if (G_lon_scan(buf, easting))
-	    return 1;
 	if (!scan_double(buf, easting))
-	    return 0;
-	while (*easting > 180.0)
-	    *easting -= 360.0;
-	while (*easting < -180.0)
-	    *easting += 360.0;
+	    return G_lon_scan(buf, easting);
 
 	return 1;
     }



More information about the grass-commit mailing list