[GRASS-SVN] r70699 - grass-addons/grass7/raster/r.in.srtm.region

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 28 08:49:47 PST 2017


Author: mmetz
Date: 2017-02-28 08:49:47 -0800 (Tue, 28 Feb 2017)
New Revision: 70699

Modified:
   grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py
Log:
r.in.srtm.region: fix zero tile creation along 0E and 0N

Modified: grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py
===================================================================
--- grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py	2017-02-28 16:49:30 UTC (rev 70698)
+++ grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py	2017-02-28 16:49:47 UTC (rev 70699)
@@ -343,22 +343,22 @@
 	    else:
 		# create tile with zeros
 		# north
-		if ndeg < 0:
+		if ndeg < -1:
 		    tmpn = '%02d:59:58.5S' % (abs(ndeg) - 2)
 		else:
 		    tmpn = '%02d:00:01.5N' % (ndeg + 1)
 		# south
-		if ndeg <= 0:
+		if ndeg < 1:
 		    tmps = '%02d:00:01.5S' % abs(ndeg)
 		else:
 		    tmps = '%02d:59:58.5N' % (ndeg - 1)
 		# east
-		if edeg < 0:
+		if edeg < -1:
 		    tmpe = '%03d:59:58.5W' % (abs(edeg) - 2)
 		else:
 		    tmpe = '%03d:00:01.5E' % (edeg + 1)
 		# west
-		if edeg <= 0:
+		if edeg < 1:
 		    tmpw = '%03d:00:01.5W' % abs(edeg)
 		else:
 		    tmpw = '%03d:59:58.5E' % (edeg - 1)



More information about the grass-commit mailing list