[r-cran-maps] 35/64: Import Upstream version 2.1-6

Andreas Tille tille at debian.org
Thu Sep 7 07:32:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-maps.

commit f3fd68779953dd7b08c267ec6e8a6c1584b4bbac
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 09:26:56 2017 +0200

    Import Upstream version 2.1-6
---
 DESCRIPTION                 |  10 ++++----
 R/map.r                     |   4 ++--
 data/canada.cities.rda      | Bin 18999 -> 13236 bytes
 data/ozone.rda              | Bin 917 -> 804 bytes
 data/us.cities.rda          | Bin 21641 -> 15676 bytes
 data/votes.repub.rda        | Bin 4731 -> 3776 bytes
 data/world.cities.rda       | Bin 661054 -> 511244 bytes
 src/Makefile.win            |   2 +-
 src/thin.c                  |  55 ++++++++++++++++++++++++++++++--------------
 src/{thin.c => thin.c.orig} |   0
 10 files changed, 46 insertions(+), 25 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 7d761cf..3e5e7ad 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,17 +1,17 @@
 Package: maps
 Title: Draw Geographical Maps
-Version: 2.1-5
-Date: 2010-09-24
+Version: 2.1-6
+Date: 2011-04-15
 Author: Original S code by Richard A. Becker and Allan R. Wilks. R
         version by Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
         Enhancements by Thomas P Minka <surname at stat.cmu.edu>
 Description: Display of maps.  Projection code and larger maps are in
         separate packages (mapproj and mapdata).
-Depends: R (>= 2.9.0)
+Depends: R (>= 2.10.0)
 LazyLoad: yes
 Suggests: mapproj
 License: GPL-2
 Maintainer: Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
-Packaged: 2010-09-23 20:55:40 UTC; ray
+Packaged: 2011-04-15 03:46:26 UTC; ray
 Repository: CRAN
-Date/Publication: 2010-09-24 06:46:08
+Date/Publication: 2011-05-03 07:28:30
diff --git a/R/map.r b/R/map.r
index f1078c1..ca2ec0e 100644
--- a/R/map.r
+++ b/R/map.r
@@ -119,8 +119,8 @@ function(database = "world", regions = ".", exact = FALSE,
   if (doproj) {
     nam <- coord$names
     library(mapproj)
-    coord <- mapproject(coord, pr = projection, pa = parameters,
-                        or = orientation)
+    coord <- mapproject(coord, projection = projection,
+			parameters = parameters, orientation = orientation)
     coord$projection = projection
     coord$parameters = parameters
     coord$orientation = orientation
diff --git a/data/canada.cities.rda b/data/canada.cities.rda
index 88498b9..f7eca19 100644
Binary files a/data/canada.cities.rda and b/data/canada.cities.rda differ
diff --git a/data/ozone.rda b/data/ozone.rda
index bb4ce76..01bf154 100644
Binary files a/data/ozone.rda and b/data/ozone.rda differ
diff --git a/data/us.cities.rda b/data/us.cities.rda
index 9c08557..432eac3 100644
Binary files a/data/us.cities.rda and b/data/us.cities.rda differ
diff --git a/data/votes.repub.rda b/data/votes.repub.rda
index cffd259..9a3c8ff 100644
Binary files a/data/votes.repub.rda and b/data/votes.repub.rda differ
diff --git a/data/world.cities.rda b/data/world.cities.rda
index 28585bf..5e5202c 100644
Binary files a/data/world.cities.rda and b/data/world.cities.rda differ
diff --git a/src/Makefile.win b/src/Makefile.win
index 83b4fe8..9062a91 100644
--- a/src/Makefile.win
+++ b/src/Makefile.win
@@ -6,7 +6,7 @@ include $(R_HOME)/etc$(R_ARCH)/Makeconf
 
 DLLNAME = maps
 
-CFLAGS = -I$(R_HOME)/include -Wall -pedantic -O2 -DWin32
+CFLAGS = -I$(R_HOME)/include -Wall -pedantic -DWin32
 
 DLLLIBS = -L$(IMPDIR) -lR
 
diff --git a/src/thin.c b/src/thin.c
index be93ffa..5263127 100644
--- a/src/thin.c
+++ b/src/thin.c
@@ -1,12 +1,6 @@
 #include "R.h"
 #include "map.h"
 
-#define INIT(a)		a.begin = -PI; a.end = PI
-#define INSTALL_UP(j)	x[upfence]=x[j]; y[upfence++]=y[j]; INIT(wedge)
-#define INSTALL_DOWN(j)	x[--downfence]=x[j]; y[downfence]=y[j]; INIT(wedge)
-#define Max(a,b)	((a)>(b)?(a):(b))
-#define Min(a,b)	((a)<(b)?(a):(b))
-
 /*
  * An arc structure has a beginning angle and
  * an ending angle.  It should be in a canonical
@@ -63,8 +57,8 @@ static void intersect(a, begin, end)
 
 	/* do the intersection ... */
   else {
-    a->begin = Max(begin, a->begin);
-    a->end = Min(end, a->end);
+    a->begin = MAX(begin, a->begin);
+    a->end = MIN(end, a->end);
   }
 
   /* canonicalize the intersection if necessary */
@@ -96,7 +90,10 @@ int thin(x, y, n, delta, symmetric)
 	/* non-symmetric thin goes from one end to the other */
 	if(!symmetric) {
 		upfence = 0;
-		INSTALL_UP(0);
+		x[upfence]=x[0];
+		y[upfence++]=y[0];
+		wedge.begin = -PI;
+		wedge.end = PI;
 		for(cur = 0, next = 1; next < n; next++) {
 			dx = x[next] - x[cur];
 			dy = y[next] - y[cur];
@@ -105,7 +102,10 @@ int thin(x, y, n, delta, symmetric)
 			theta = atan2(dy, dx);
 			if(!inarc(wedge, theta)) {
 				cur = --next;
-				INSTALL_UP(cur);
+				x[upfence]=x[cur];
+				y[upfence++]=y[cur];
+				wedge.begin = -PI;
+				wedge.end = PI;
 				continue;
 			}
 			dist = hypot(dx, dy);
@@ -114,13 +114,19 @@ int thin(x, y, n, delta, symmetric)
 				intersect(&wedge, theta - alpha, theta + alpha);
 			}
 		}
-		INSTALL_UP(n-1);
+		x[upfence]=x[n-1];
+		y[upfence++]=y[n-1];
+		wedge.begin = -PI;
+		wedge.end = PI;
 		return(upfence);
 	}
 
 	/* symmetric version: first thin from the beginning to the middle */
 	upfence = 0; mid = (n + 1) / 2;
-	INSTALL_UP(0);
+	x[upfence]=x[0];
+	y[upfence++]=y[0];
+	wedge.begin = -PI;
+	wedge.end = PI;
 	for(cur = 0, next = 1; next < mid; next++) {
 		dx = x[next] - x[cur];
 		dy = y[next] - y[cur];
@@ -129,7 +135,10 @@ int thin(x, y, n, delta, symmetric)
 		theta = atan2(dy, dx);
 		if(!inarc(wedge, theta)) {
 			cur = --next;
-			INSTALL_UP(cur);
+			x[upfence]=x[cur];
+			y[upfence++]=y[cur];
+			wedge.begin = -PI;
+			wedge.end = PI;
 			continue;
 		}
 		dist = hypot(dx, dy);
@@ -138,12 +147,18 @@ int thin(x, y, n, delta, symmetric)
 			intersect(&wedge, theta - alpha, theta + alpha);
 		}
 	}
-	INSTALL_UP(mid-1);
+	x[upfence]=x[mid-1];
+	y[upfence++]=y[mid-1];
+	wedge.begin = -PI;
+	wedge.end = PI;
 	uptotal = upfence;
 
 	/* now work from the end to the middle */
 	downfence = n; mid = n - mid;
-	INSTALL_DOWN(n-1);
+	x[--downfence]=x[n-1];
+	y[downfence]=y[n-1];
+	wedge.begin = -PI;
+	wedge.end = PI;
 	for(cur = n-1, next = n-2; next >= mid; next--) {
 		dx = x[next] - x[cur];
 		dy = y[next] - y[cur];
@@ -152,7 +167,10 @@ int thin(x, y, n, delta, symmetric)
 		theta = atan2(dy, dx);
 		if(!inarc(wedge, theta)) {
 			cur = ++next;
-			INSTALL_DOWN(cur);
+			x[--downfence]=x[cur];
+			y[downfence]=y[cur];
+			wedge.begin = -PI;
+			wedge.end = PI;
 			continue;
 		}
 		dist = hypot(dx, dy);
@@ -161,7 +179,10 @@ int thin(x, y, n, delta, symmetric)
 			intersect(&wedge, theta - alpha, theta + alpha);
 		}
 	}
-	INSTALL_DOWN(mid);
+	x[--downfence]=x[mid];
+	y[downfence]=y[mid];
+	wedge.begin = -PI;
+	wedge.end = PI;
 	downtotal = n - downfence;
 
 	/* for n odd, middle point is recorded twice, so fix that */
diff --git a/src/thin.c b/src/thin.c.orig
similarity index 100%
copy from src/thin.c
copy to src/thin.c.orig

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-maps.git



More information about the debian-science-commits mailing list