[r-cran-maps] 62/64: Import Upstream version 3.1.1

Andreas Tille tille at debian.org
Thu Sep 7 07:32:38 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 233352e5bae093f96c0b5083ea4e92dc60c3c7e7
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 09:28:26 2017 +0200

    Import Upstream version 3.1.1
---
 DESCRIPTION           |   8 ++++----
 MD5                   |  18 +++++++++---------
 R/db.r                |   7 +++++--
 R/map.r               |   7 +++++--
 R/zzz.R               |   9 ---------
 README.md             |   4 ++--
 data/world.cities.rda | Bin 509268 -> 515500 bytes
 inst/NEWS.Rd          |   9 ++++++++-
 inst/README.md        |   4 ++--
 src/legacy_world.name |   4 ++--
 10 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index c4fa545..ce96990 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: maps
 Title: Draw Geographical Maps
-Version: 3.1.0
-Date: 2016-02-11
+Version: 3.1.1
+Date: 2016-07-19
 Author: Original S code by Richard A. Becker and Allan R. Wilks.
 	R version by Ray Brownrigg.
         Enhancements by Thomas P Minka and Alex Deckmyn.
@@ -15,5 +15,5 @@ License: GPL-2
 Maintainer: Alex Deckmyn <alex.deckmyn at meteo.be>
 NeedsCompilation: yes
 Repository: CRAN
-Packaged: 2016-02-11 19:32:51 UTC; dalex
-Date/Publication: 2016-02-13 19:01:15
+Packaged: 2016-07-25 14:07:27 UTC; dalex
+Date/Publication: 2016-07-27 18:47:42
diff --git a/MD5 b/MD5
index 0dc861f..6cb5a4c 100644
--- a/MD5
+++ b/MD5
@@ -1,15 +1,15 @@
-dda5c43675dfe66acaac3f33cd674db5 *DESCRIPTION
+5bd54aaaa4ac37cab828237e61cafc02 *DESCRIPTION
 e9cd62e610cc10123a2faf1034b5764c *NAMESPACE
-fbad20280c5fedb6ef180a3003e632b5 *R/db.r
+7051f3c901f13392f0fbe6c5dcde378e *R/db.r
 b47ae9aa3c8ee795873776c237cf8ee4 *R/iso.r
 80c3bff9746358491c31d67c16ac8ec5 *R/legacy.r
-ad6a7bab86c65a5a293d160395f27746 *R/map.r
+5911700463450b9344cff43eb094f946 *R/map.r
 b2d906b4c1cd68f05ac469f917c77b12 *R/misc.r
 07a563661e4a7ad5d89ffc50047e9e3f *R/polygon.r
 20bb9799785aaf657cfb346f36861e26 *R/read.sp.R
 45bb5cad9ffc203d8e62dae784725f37 *R/smooth.r
-3683d52dd8808dce66d1e227fa5c3783 *R/zzz.R
-1ef8e4549558ca6d9123d3a144e8fff2 *README.md
+975d797461333e3910dd7784587b646c *R/zzz.R
+ce807f04b536c877076fe80ecd0bafe4 *README.md
 bb41a07b00de367aa7d953620868aa2e *cleanup
 3e0825db5fa2274cef275920bfd1d221 *configure
 72fcddfaf72fb7ff82ea4a6e6cd06da0 *configure.ac
@@ -34,11 +34,11 @@ e5e971cef422bb733644791ebdc05547 *data/state.fips.rda
 47260e722f73cdedba76a2cc1e6a3205 *data/us.cities.rda
 39f427ea30add5d209453cc4482cd3bf *data/usaMapEnv.rda
 0f1a65d78161fb00e86d5386a2f883cd *data/votes.repub.rda
-5c911aec44edd98c83aca470f8fbfa77 *data/world.cities.rda
+0bf0f21a09178dd1a0fb87c92f6a15a3 *data/world.cities.rda
 e338da5c189460e1ec63cf396799830b *data/world2MapEnv.rda
 a46b3243710a9eb7369556ca8a9bb0cc *data/worldMapEnv.rda
-04ccbe82fe99e145ae6167008f46ece6 *inst/NEWS.Rd
-1ef8e4549558ca6d9123d3a144e8fff2 *inst/README.md
+81c6b65e9aeb1381d09744b8513722f4 *inst/NEWS.Rd
+ce807f04b536c877076fe80ecd0bafe4 *inst/README.md
 061ccbe2a3b354214c14d5a274efee50 *man/Spatial2map.Rd
 5f9fab4844ba7d6a1ad6f65e8f684355 *man/area.map.Rd
 bcd90a5871cfbca677d5e2590d308d87 *man/canada.cities.Rd
@@ -106,7 +106,7 @@ f1a1b6c9257c30aed9625a01dcec660b *src/legacy_world.gon
 0902fc2c7b181fbf40673b9d9748ad00 *src/legacy_world.gonstats
 76e802969266838ed27ee0a27f05ba80 *src/legacy_world.line
 a92ae175e549ef37cdcd565b97dac430 *src/legacy_world.linestats
-68f03e9284badbce449db64b3f2c0370 *src/legacy_world.name
+f0dbcd1e86cba7c5de44bf2b92f51ee2 *src/legacy_world.name
 28f0356bc9bb3e0b479b9cc916930730 *src/map.h
 4710bd28f9dbd6b1230d79c2df0f8467 *src/mapget.c
 5e9c4adf4fc41a391e3539fa708961b0 *src/nz.gon
diff --git a/R/db.r b/R/db.r
index 0ae5da3..570b0f5 100644
--- a/R/db.r
+++ b/R/db.r
@@ -118,7 +118,10 @@ function(database = "world", patterns, exact = FALSE)
       }
     }
     regexp <- paste("(^", patterns, ")", sep = "", collapse = "|")
-    i <- grep(regexp, nam, ignore.case = TRUE, perl=TRUE)
+# BUGFIX: perl regex is limited to about 30000 characters
+# so this crashes if patterns includes the whole world map
+    i <- grep(regexp, nam, ignore.case = TRUE,
+              perl = (length(patterns) < 1000) & (nchar(regexp) < 30000))
   }
   if(length(i) == 0) return(NULL)
   r <- cnames[i, 2]
@@ -229,7 +232,7 @@ match.map.slow <- function(nam, regions, warn = FALSE) {
     regexp <- paste("(^", pattern, ")", sep = "", collapse = "|")
     #r <- grep(regexp, nam)
     region.hash = as.character(char.to.ascii(substr(pattern, let, let)))
-    r <- grep(regexp, nam.bin[[region.hash]], perl=TRUE)
+    r <- grep(regexp, nam.bin[[region.hash]], perl= TRUE )
     if(length(r) > 0) {
       r = index.bin[[region.hash]][r]
       result[r] <- i
diff --git a/R/map.r b/R/map.r
index 39ff85d..e4eb3e8 100644
--- a/R/map.r
+++ b/R/map.r
@@ -69,8 +69,11 @@ map.poly <- function(database, regions = ".", exact = FALSE,
 ## But here you have a simple set of named polygons, not a map database.
 ## If it comes from anything but "world", we could break something else.
 ## We just leave it for now.
-      regexp <- paste("(^", regions, ")", sep = "", collapse = "|")
-        i <- grep(regexp, the.map$names, ignore.case = TRUE, perl=TRUE)
+        regexp <- paste("(^", regions, ")", sep = "", collapse = "|")
+## FIXME: find a better solution
+# perl regex crashes on >30000 characters, e.g. whole world database
+        i <- grep(regexp, the.map$names, ignore.case = TRUE,
+                  perl = (length(regions) < 1000) & (nchar(regexp) < 30000) )
       }
       if (length(i) == 0) stop("no recognized region names")
       nam <- the.map$names[i]
diff --git a/R/zzz.R b/R/zzz.R
index e5dcc3d..9605cf7 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,12 +1,3 @@
-.onAttach <- function(lib,pkg) {
-  packageStartupMessage("\n",
-#      " ############################################################\n",
-      " # maps v3.1: updated 'world': all lakes moved to separate new #\n",
-      " # 'lakes' database. Type '?world' or 'news(package=\"maps\")'.  #\n",
-#      " ############################################################\n")
-      "\n")
-}
-
 .onLoad <- function(lib, pkg) {
   if (Sys.getenv("R_MAP_DATA_DIR") == "")
     Sys.setenv("R_MAP_DATA_DIR" = paste(lib, pkg, "mapdata/", sep="/"))
diff --git a/README.md b/README.md
index 17fd38d..c5726f0 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,8 @@ This version 3 of the maps package. The main change with respect to v2 is a new
 
 - The 'world' data base has been replaced by a much more recent data base, imported from the Natural Earth data project (the 1:50m world map, version 2.0, the latest version available in 2015)
 This may have several implications for code that calls map().
-  * Country names have changed. This is inevitable, since e.g. post-1990 Europe is dramatically different. As a consequence, any call to map() that involves the argument "region=...", may be affected. For instance, map('world','USSR') is now obsolete, while map('world','Russia') works fine.
   * As of version 3.1, the 'world' database no longer contains lakes and lake islands. These are now in a separate database called 'lakes'.
+  * Country names have changed. This is inevitable, since e.g. post-1990 Europe is dramatically different. As a consequence, any call to map() that involves the argument "region=...", may be affected. For instance, map('world','USSR') is now obsolete, while map('world','Russia') works fine.
   * The new data base contains less small islands, but the choice may be a bit different.
   * Some remote islands that are officially part of other countries may cause an unexpected change in the scale of a map. This is not a new phenomenon (map('world','france') had this in the old set), but some new cases may occur now. As explained below, this will now occur *less often*. 
   * The naming of all polygons is as close as possible to the old world map. However, some inconsistencies have been remedied, e.g. on whether an island is called by its own name or as part of the country it belongs to. The choice is now mainly dependent on whether the entity has a seperate ISO code. The naming scheme unfortunately does not permit to represent all the intricacies. The data set iso3166 (see further) is added to provide more details.
@@ -19,7 +19,7 @@ This may have several implications for code that calls map().
 
 ##ADDITIONS
 
-- v3.1 includes support for 'SpatialPolygons' and 'SpatialLines' classes. Such objects can now either be passed to map() directly or first be converted to a map-type list with the new functions 'SpatialPolygons2map()' and 'SpatialLines2map'. These functions do not copy all the information present in the original data: only polygon names and co-ordinates are preserved.
+- v3.1 includes support for 'SpatialPolygons' and 'SpatialLines' classes. Such objects can now either be passed to map() directly or first be converted to a map-type list with the new functions 'SpatialPolygons2map()' and 'SpatialLines2map'. These functions do not copy all the information present in the original data: only polygon names and co-ordinates are preserved (additional information like holes, plotting order etc. is ignored).
 
 - A new databse 'lakes' has been added. The standard 'world' map no longer contains any lakes.
 
diff --git a/data/world.cities.rda b/data/world.cities.rda
index 9a1297a..5ffe4b4 100644
Binary files a/data/world.cities.rda and b/data/world.cities.rda differ
diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd
index f67431a..44e85c6 100644
--- a/inst/NEWS.Rd
+++ b/inst/NEWS.Rd
@@ -1,10 +1,17 @@
 \name{NEWS}
 \title{News for package 'maps'}
+\section{Changes in maps version 3.1.1 (2016-07-19)}{
+  \itemize{
+    \item perl style regex caused problems for very long lists of regions. Fixed by setting perl=FALSE if the list of regions contains more than 1000 entries or the resulting regex is more than 30000 characters long.
+    \item A few minor corrections to country and city names.
+    \item Removed start-up message.
+  }
+}
 \section{Changes in maps version 3.1.0 (2016-01-19)}{
   \itemize{
     \item 'world' database changed to version without lakes punched out at the borders. The previous version still had various issues, so this is much cleaner. Now 'interior=FALSE' actually works on the whole world map.``
     \item Major lakes are now available from a separate database 'lakes'.
-    \item Basic support for 'SpatialPolygons' and 'SpatialLines' class objects as map database. Internally, \code{maps()} calls new functions \code{SpatialPolygons2map()} and \code{SpatialLines2map()} which transform to the simple 'maps' format, but \emph{only the polygon names and coordinates themselves}. All other data is ignored.
+    \item Basic support for 'SpatialPolygons' and 'SpatialLines' class objects as map database. Internally, \code{maps()} calls new functions \code{SpatialPolygons2map()} and \code{SpatialLines2map()} which transform to the simple 'maps' format, but \emph{only the polygon names and coordinates themselves}. All other information (holes, plotting order etc.) is ignored.
     \item 'world2' (the pacific centered map) now has clean cut polygons at the boundaries, so there are no more artefacts when e.g. \code{fill=TRUE}.
     \item map() now (silently) ignores thinning (\code{resolution>0}) when drawing polygons in stead of polylines. This was already the case for list-based maps, but not for \code{fill=TRUE}. The assymetric thinning caused artefacts. Plotting may be a bit slower now, noticably so for 'worldHires'. But usually you don't want to plot a complete world map at such a high resolution anyway.
     \item \code{wrap=TRUE} is no longer ignored when \code{plot=FALSE}. Also, wrapping is now called before thinning, which should give slightly better results.
diff --git a/inst/README.md b/inst/README.md
index 17fd38d..c5726f0 100644
--- a/inst/README.md
+++ b/inst/README.md
@@ -7,8 +7,8 @@ This version 3 of the maps package. The main change with respect to v2 is a new
 
 - The 'world' data base has been replaced by a much more recent data base, imported from the Natural Earth data project (the 1:50m world map, version 2.0, the latest version available in 2015)
 This may have several implications for code that calls map().
-  * Country names have changed. This is inevitable, since e.g. post-1990 Europe is dramatically different. As a consequence, any call to map() that involves the argument "region=...", may be affected. For instance, map('world','USSR') is now obsolete, while map('world','Russia') works fine.
   * As of version 3.1, the 'world' database no longer contains lakes and lake islands. These are now in a separate database called 'lakes'.
+  * Country names have changed. This is inevitable, since e.g. post-1990 Europe is dramatically different. As a consequence, any call to map() that involves the argument "region=...", may be affected. For instance, map('world','USSR') is now obsolete, while map('world','Russia') works fine.
   * The new data base contains less small islands, but the choice may be a bit different.
   * Some remote islands that are officially part of other countries may cause an unexpected change in the scale of a map. This is not a new phenomenon (map('world','france') had this in the old set), but some new cases may occur now. As explained below, this will now occur *less often*. 
   * The naming of all polygons is as close as possible to the old world map. However, some inconsistencies have been remedied, e.g. on whether an island is called by its own name or as part of the country it belongs to. The choice is now mainly dependent on whether the entity has a seperate ISO code. The naming scheme unfortunately does not permit to represent all the intricacies. The data set iso3166 (see further) is added to provide more details.
@@ -19,7 +19,7 @@ This may have several implications for code that calls map().
 
 ##ADDITIONS
 
-- v3.1 includes support for 'SpatialPolygons' and 'SpatialLines' classes. Such objects can now either be passed to map() directly or first be converted to a map-type list with the new functions 'SpatialPolygons2map()' and 'SpatialLines2map'. These functions do not copy all the information present in the original data: only polygon names and co-ordinates are preserved.
+- v3.1 includes support for 'SpatialPolygons' and 'SpatialLines' classes. Such objects can now either be passed to map() directly or first be converted to a map-type list with the new functions 'SpatialPolygons2map()' and 'SpatialLines2map'. These functions do not copy all the information present in the original data: only polygon names and co-ordinates are preserved (additional information like holes, plotting order etc. is ignored).
 
 - A new databse 'lakes' has been added. The standard 'world' map no longer contains any lakes.
 
diff --git a/src/legacy_world.name b/src/legacy_world.name
index f29eed3..db22b7f 100644
--- a/src/legacy_world.name
+++ b/src/legacy_world.name
@@ -1090,7 +1090,7 @@ Canada:Lake Winnipeg	1089
 Canada:Jens Munk Island	1090
 Canada:Graham Island	1091
 Spain:Ibiza	1092
-China:Makung	1093
+Taiwan:Penghu	1093
 Cape Verde:Boa Vista	1094
 Chile:Isla Piazzi	1095
 Maldives:?	1096
@@ -2057,7 +2057,7 @@ Falkland Islands:Weddell Island	2056
 Malaysia:Tanjong Sirik	2057
 USA:Alaska:Big Koniuji Island	2058
 Equatorial Guinea:Fernando Po	2059
-China:Chinmen Tao	2060
+Taiwan:Chinmen Tao	2060
 Indonesia:Tebingtinggi	2061
 New Zealand:?	2062
 Micronesia:Mortlock	2063

-- 
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