浏览代码

libgis: G_scan_easting/G_scan_northing: limits are already checked in G_lon_scan/G_lat_scan

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70646 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 8 年之前
父节点
当前提交
485a8794d8
共有 1 个文件被更改,包括 3 次插入11 次删除
  1. 3 11
      lib/gis/wind_scan.c

+ 3 - 11
lib/gis/wind_scan.c

@@ -38,12 +38,10 @@ static int scan_double(const char *, double *);
 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_northing(const char *buf, double *northing, int projection)
 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;
     }