[r-cran-mapproj] 15/23: Import Upstream version 1.2-1

Andreas Tille tille at debian.org
Fri Sep 8 08:03:07 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-mapproj.

commit 357e560a2cc103bd55a3403cb9d7c000f0ce7a50
Author: Andreas Tille <tille at debian.org>
Date:   Fri Sep 8 09:58:11 2017 +0200

    Import Upstream version 1.2-1
---
 DESCRIPTION  | 15 ++++++++-------
 LICENSE      | 21 ---------------------
 MD5          | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 NAMESPACE    |  6 ++++++
 R/mapproj.r  | 35 +++++++++++++++++++++--------------
 R/zzz.R      |  7 -------
 src/cuts.c   |  6 +++++-
 src/lune.c   |  4 ++++
 src/map.h    |  2 +-
 src/zcoord.c |  4 ++--
 10 files changed, 96 insertions(+), 53 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 784e402..993438a 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,13 +1,14 @@
 Package: mapproj
 Title: Map Projections
-Version: 1.1-8.3
-Date: 2011-01-17
+Version: 1.2-1
+Date: 2013-03-25
 Author: Doug McIlroy.  Packaged for R by Ray Brownrigg and Thomas P
         Minka, transition to Plan 9 codebase by Roger Bivand.
 Description: Converts latitude/longitude into projected coordinates.
-Depends: maps
-License: file LICENSE
-Maintainer: Thomas P Minka <tpminka at media.mit.edu>
-Packaged: 2011-01-17 08:34:49 UTC; rsb
+Depends: maps (>= 2.3-0)
+License: Lucent Public License
+Maintainer: Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
+Packaged: 2013-03-24 23:28:21 UTC; ray
+NeedsCompilation: yes
 Repository: CRAN
-Date/Publication: 2011-01-17 08:42:33
+Date/Publication: 2013-03-25 21:59:46
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 884def3..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-1. C code
-
-Source code for maps and map projections, included in 
-the Plan 9 distribution at: http://plan9.bell-labs.com/plan9/download.html
-(sys/src/cmd/map/), downloaded November 1, 2009 by Roger Bivand.
-
-Copyrighted and licensed by Lucent Technologies Inc., see
-http://plan9.bell-labs.com/plan9dist/license.html. All changes marked to
-satisfy requirement 3 C. The statement:
-
-Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved.
-
-is included in file map.h to satisfy requirement 3 B.
-
-2. R interface: 
-
-The R interface code has been developed as work based on the Lucent
-Public License Version 1.02 licensed code. It is made available under both 
-the Plan 9 license and GPL (>= 2).
-
-
diff --git a/MD5 b/MD5
new file mode 100644
index 0000000..39267e1
--- /dev/null
+++ b/MD5
@@ -0,0 +1,49 @@
+fb1581c025071e688db77a2c7a26d886 *DESCRIPTION
+e3ba9ada0c2f29e43945a161a9dbf035 *NAMESPACE
+faae0b105fcc3aa705ecf17bbc7097a7 *R/mapproj.r
+859cb2da4fdb6e53d6068cd73b7d8471 *inst/LICENSE
+924f5f94fc61488c8cd34478deb3510d *man/map.grid.Rd
+dc388acbb8da028fee91562612b882d6 *man/mapproject.Rd
+1e220fbd9ec36780a036ddc43a17ef08 *src/Makevars.debug
+963422f3661a1419150ea314b5b3a4c5 *src/aitoff.c
+4cad728b0ed706ee2002f3d977647d27 *src/albers.c
+1789fbc55ae7967b57f329ab72b1abf4 *src/azequalarea.c
+b48479d7ab2d76195ee994ae6a088f07 *src/azequidist.c
+9d3d4f7691130561925a077ce7574b24 *src/bicentric.c
+ca58fbdeacc7b7fea3e49715d440dae8 *src/bonne.c
+2ece0e8ed684e1dc05d6c55ead9c0bf1 *src/ccubrt.c
+16c4a1feb91f826879571eab500b7de6 *src/complex.c
+f29465a5f2724f08e4e74df9f7da3956 *src/conic.c
+915fc9297f76b043270bba14ae9b677e *src/cubrt.c
+e6951853f5a5dcafc7cc57dbf01277f1 *src/cuts.c
+dcc266276712c1c206163a2135adfcaf *src/cylequalarea.c
+4aeb64bc71c26c294cb1c98ec2cfd422 *src/cylindrical.c
+08c8c981c0b3583a218286c653253ab2 *src/eisenlohr.c
+d13f5814ed16b40e4efc3b6690207685 *src/elco2.c
+a06090a034194a98c8722783b2057d30 *src/elliptic.c
+1d9bfc2b75c5a359d377c54e89a8de46 *src/fisheye.c
+cea60c90b42c4af4ea5b54726d348c52 *src/gall.c
+f5b531d076dc5c1cba56cdafdbd8d90a *src/gilbert.c
+0e24b313e28539a09403b948e3d44cca *src/guyou.c
+1d97c7dc429901e3ad46c92d23f54d72 *src/harrison.c
+b130df782ad891ab0e13af5c6f5e573e *src/hex.c
+abdfb7e8c7a3d223af25745ea39283d3 *src/homing.c
+3883049518bbc60de9af2394649203ca *src/lagrange.c
+d5cb43e2764ac81e2524041f2d4af2cb *src/lambert.c
+270fec0e947e395e1ac74950d4cee39c *src/laue.c
+6073a029d500a0b7c69c2bc6c7eed9bd *src/lune.c
+fa9e51aea2a9c9f2a4b8489e2e4ad052 *src/map.h
+38950e1951a6f2e28dc46fdcbe3ec473 *src/mapproject.c
+c9cb7e5d306dea81a01e7aa5de4d18df *src/mercator.c
+1aa54f763ad4839773e6ea12ce926fbc *src/mollweide.c
+ebf89710c52f2558a03dd08afaa13b1c *src/newyorker.c
+cdfa10318e2136f419986069a0f5d5f4 *src/orthographic.c
+6120ddf84594040daf2459b020acbe54 *src/perspective.c
+0e0ec545cb2dddcab20c826d402345ab *src/polyconic.c
+7506438efb2210f480446aacba052164 *src/rectangular.c
+a2b7e53517cbd01e2beafc89f91bc774 *src/simpleconic.c
+6e15d2d163e9fec33cb3313480f032e3 *src/sinusoidal.c
+638ff48404e1c396b3ed0069d405558f *src/tetra.c
+a3099bccdbab035c3ec6fa12e790eba2 *src/trapezoidal.c
+abeb12aaff9af6ad10cb0c9b10b51c59 *src/twocirc.c
+9e3be978e17cacfebd95156beaef3149 *src/zcoord.c
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..662bca3
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,6 @@
+useDynLib("mapproj")
+
+importFrom(maps, map.wrap)
+
+export(map.grid, mapproject, .Last.projection)
+
diff --git a/R/mapproj.r b/R/mapproj.r
index b849aa6..d654b3f 100755
--- a/R/mapproj.r
+++ b/R/mapproj.r
@@ -1,3 +1,8 @@
+".Last.projection"<-
+local({
+    val <- list(projection = "", parameters = NULL, orientation = NULL)
+    function(new) if(!missing(new)) val <<- new else val
+     })
 "mapproject"<-
 function(x, y, projection = "", parameters = NULL, orientation = NULL)
 {
@@ -21,17 +26,17 @@ function(x, y, projection = "", parameters = NULL, orientation = NULL)
       stop("orientation argument must have 3 elements")
   }
   else {
-    if(!exists(".Last.projection", envir = globalenv())) {
+    if(nchar(.Last.projection()$projection) == 0) {
       #stop("no previous projection")
       return(list(x=x,y=y))
     }
-    p <- get(".Last.projection", envir = globalenv())
+    p <- .Last.projection()
     projection <- p$projection
     if(is.null(parameters)) parameters <- p$parameters
     else if(length(parameters) != length(p$parameters))
-      stop(paste("expecting", length(p$parameters), 
+      stop(paste("expecting", length(p$parameters),
                  "parameters for", projection, "projection"))
-    
+
     if(is.null(orientation)) orientation <- p$orientation
     else if(length(orientation) != 3)
       stop("orientation argument must have 3 elements")
@@ -44,10 +49,9 @@ function(x, y, projection = "", parameters = NULL, orientation = NULL)
               error = character(1),PACKAGE="mapproj")$error
   if(error != "")
     stop(error)
-  assign(".Last.projection", list(projection = projection,
-                                  parameters = parameters,
-                                  orientation = orientation),
-         envir = globalenv())
+  .Last.projection(list(projection = projection,
+                        parameters = parameters,
+                        orientation = orientation))
   .C("doproj",
      x = as.double(x),
      y = as.double(y),
@@ -57,10 +61,12 @@ function(x, y, projection = "", parameters = NULL, orientation = NULL)
      NAOK = TRUE,PACKAGE="mapproj")[c("x", "y", "range", "error")]
 }
 
-map.grid <- function(lim,nx=9,ny=9,labels=TRUE,pretty=TRUE,
-                     cex=1,col=4,lty=2,font=2,...) {
-  # uses map.wrap from maps library
-  pretty.range <- function(lim,...) {
+map.grid <-
+function(lim, nx = 9, ny = 9, labels = TRUE, pretty = TRUE, cex = 1,
+	col = 4, lty = 2, font = 2, ...) {
+  # uses map.wrap from maps package
+  pretty.range <-
+  function(lim,...) {
     # like pretty but ensures that the range is identical:
     # range(pretty.range(x)) == range(x)
     x = pretty(lim,...)
@@ -70,7 +76,8 @@ map.grid <- function(lim,nx=9,ny=9,labels=TRUE,pretty=TRUE,
     x[1] = lim[1]; x[length(x)] = lim[2]
     x
   }
-  auto.format <- function(x) {
+  auto.format <-
+  function(x) {
     # use the minimal number of digits to make x's unique
     # similar to abbrev
     for(digits in 0:6) {
@@ -80,7 +87,7 @@ map.grid <- function(lim,nx=9,ny=9,labels=TRUE,pretty=TRUE,
     s
   }
   # by default, use limits of last map
-  if(missing(lim)) lim = .map.range
+  if(missing(lim)) lim = .map.range()
   if(is.list(lim)) {
     # first argument is a map
     lim <- lim$range
diff --git a/R/zzz.R b/R/zzz.R
deleted file mode 100755
index 156a9f1..0000000
--- a/R/zzz.R
+++ /dev/null
@@ -1,7 +0,0 @@
-.First.lib <- function(lib, pkg) {
-  library.dynam("mapproj", pkg, lib)
-# RSB 110117 remove external reference NOTE to .map.range
-  xx <- try(get(".map.range", env=globalenv()), silent=TRUE)
-  if (class(xx) == "try-error")
-    assign(".map.range", as.numeric(c(0, 1, 0, 1)), envir = globalenv())
-}
diff --git a/src/cuts.c b/src/cuts.c
index 8ae05e1..d49bfd7 100755
--- a/src/cuts.c
+++ b/src/cuts.c
@@ -1,7 +1,11 @@
+#include <R.h>
 /* RSB #include <u.h>
 #include <libc.h>*/
 #include "map.h"
-extern void abort(void);
+
+// CRAN change 2012-12-10
+//extern void abort(void);
+#define abort() error("fatal error in mapproj")
 
 /* these routines duplicate names found in map.c.  they are
 called from routines in hex.c, guyou.c, and tetra.c, which
diff --git a/src/lune.c b/src/lune.c
index 56f9b15..090a80f 100755
--- a/src/lune.c
+++ b/src/lune.c
@@ -1,6 +1,10 @@
+#include <R.h>
 /* RSB #include <u.h>
 #include <libc.h>*/
 #include "map.h"
+// CRAN change 2012-12-10
+#define abort() error("fatal error in mapproj")
+
 
 int Xstereographic(struct place *place, double *x, double *y);
 
diff --git a/src/map.h b/src/map.h
index 1b12d43..5c395fe 100755
--- a/src/map.h
+++ b/src/map.h
@@ -136,7 +136,7 @@ void	trig(struct coord *);
 void	normalize(struct place *);
 void	invert(struct place *);
 void	norm(struct place *, struct place *, struct coord *);
-void	printp(struct place *);
+/* void	printp(struct place *); */
 void	copyplace(struct place *, struct place *);
 
 int	picut(struct place *, struct place *, double *);
diff --git a/src/zcoord.c b/src/zcoord.c
index 3defd43..f07c1e5 100755
--- a/src/zcoord.c
+++ b/src/zcoord.c
@@ -133,12 +133,12 @@ tan(double x)
 	return(sin(x)/cos(x));
 }
 
-void
+/* void
 printp(struct place *g)
 {
 printf("%.3f %.3f %.3f %.3f %.3f %.3f\n",
 g->nlat.l,g->nlat.s,g->nlat.c,g->wlon.l,g->wlon.s,g->wlon.c);
-}
+}*/
 
 void
 copyplace(struct place *g1, struct place *g2)

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



More information about the debian-science-commits mailing list