[r-cran-maptools] 15/20: Import Upstream version 0.8-39+dfsg

Andreas Tille tille at debian.org
Sun Jan 15 18:55:44 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-maptools.

commit 00ffe66a1967a12f1e6a0c09ad27c8ffc4e20333
Author: Andreas Tille <tille at debian.org>
Date:   Sun Jan 15 19:53:30 2017 +0100

    Import Upstream version 0.8-39+dfsg
---
 ChangeLog                      | 928 +++++++++++++++++++----------------------
 DESCRIPTION                    |  27 +-
 MD5                            |  98 ++---
 NAMESPACE                      |   9 +-
 R/DP.R                         |   6 +-
 R/Rgshhs.R                     |  14 +-
 R/SP2owin.R                    |  14 +-
 R/checkHoles.R                 |  46 +-
 R/colslegs.R                   |  45 +-
 R/getKMLcoordinates.R          |   3 +-
 R/kmlPoints.R                  |   2 +-
 R/nowrapRecenter.R             | 148 ++++++-
 R/point_line_distance.R        |  10 +-
 R/sp2pbs.R                     |  34 +-
 R/sp_spat1.R                   |  40 +-
 R/spatstat1.R                  |  95 +++--
 R/spmaps.R                     |  44 +-
 R/union.R                      |  16 +-
 build/vignette.rds             | Bin 224 -> 223 bytes
 data/gpcholes.rda              | Bin 354 -> 0 bytes
 data/state.vbm.rda             | Bin 4397 -> 0 bytes
 inst/ChangeLog                 | 928 +++++++++++++++++++----------------------
 inst/README                    |   3 +
 inst/doc/combine_maptools.R    |   2 +-
 inst/doc/combine_maptools.Rnw  |   4 +-
 inst/doc/combine_maptools.pdf  | Bin 451410 -> 451411 bytes
 inst/shapes/Testing.kml        |  14 +
 man/GE_SpatialGrid.Rd          |   8 +-
 man/SpatialLines2PolySet.Rd    |   9 +-
 man/as.ppp.Rd                  |  16 +-
 man/dotsInPolys.Rd             |   3 +-
 man/getKMLcoordinates.Rd       |   2 +
 man/gzAzimuth.Rd               |   2 +-
 man/kmlLine.Rd                 |   2 +-
 man/kmlLines.Rd                |   2 +-
 man/kmlOverlay.Rd              |  16 +-
 man/kmlPoints.Rd               |   6 +-
 man/leglabs.Rd                 |  14 +-
 man/map2SpatialPolygons.Rd     |  14 +-
 man/nowrapRecenter.Rd          |  17 +-
 man/nowrapSpatialLines.Rd      |  41 ++
 man/readGPS.Rd                 |  32 +-
 man/readSplus.Rd               |   2 +-
 man/sp2Mondrian.Rd             |   2 +-
 man/sp2WB.Rd                   |   4 +-
 man/sp2tmap.Rd                 |   2 +
 man/symbolsInPolys.Rd          |   3 +-
 man/wrld_simpl.Rd              |   2 +-
 src/Rgshhs.c                   |  10 +-
 src/pip.c                      |  19 -
 src/shapefil.h                 |  14 +-
 vignettes/combine_maptools.Rnw |   4 +-
 52 files changed, 1482 insertions(+), 1294 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f08d56a..c705e72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,114 +1,240 @@
+2016-01-28 13:48  rsbivand
+
+	* DESCRIPTION, R/kmlPoints.R, man/kmlPoints.Rd, man/wrld_simpl.Rd,
+	  src/pip.c: remove S.h from src/pip.c
+
+2015-10-28 21:01  rsbivand
+
+	* data/wrld_simpl.rda: tidy
+
+2015-10-14 13:07  rsbivand
+
+	* DESCRIPTION, inst/README, inst/shapes/Testing.kml,
+	  inst/shapes/tessellate.kml, man/getKMLcoordinates.Rd: tidy
+
+2015-10-14 07:06  rsbivand
+
+	* inst/README: tidy
+
+2015-10-13 14:43  rsbivand
+
+	* man/as.ppp.Rd: tidy
+
+2015-10-13 12:36  rsbivand
+
+	* DESCRIPTION, R/getKMLcoordinates.R, inst/README,
+	  inst/shapes/tessellate.kml, man/getKMLcoordinates.Rd: fix
+	  getKMLcoordinates bug
+
+2015-10-13 12:31  rsbivand
+
+	* man/nowrapSpatialLines.Rd: tidy
+
+2015-09-28 22:20  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-09-28 22:19  rsbivand
+
+	* ChangeLog, DESCRIPTION, NAMESPACE, R/nowrapRecenter.R,
+	  R/sp_spat1.R, man/as.ppp.Rd, man/gzAzimuth.Rd: tidy
+
+2015-07-03 11:21  rsbivand
+
+	* R/nowrapRecenter.R, R/sp_spat1.R, R/spmaps.R: nowrapSL to rgeos
+
+2015-06-30 21:16  rsbivand
+
+	* DESCRIPTION, R/sp_spat1.R, man/as.ppp.Rd: RasterLayer to im
+	  coercion
+
+2015-06-30 05:52  rsbivand
+
+	* DESCRIPTION, NAMESPACE, R/nowrapRecenter.R, R/spmaps.R,
+	  man/map2SpatialPolygons.Rd, man/nowrapRecenter.Rd: nowrap
+	  revisions
+
+2015-06-28 15:17  rsbivand
+
+	* DESCRIPTION, NAMESPACE, R/nowrapRecenter.R: CRAN
+	  _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_=true NAMESPACE tidy
+
+2015-06-10 13:55  rsbivand
+
+	* DESCRIPTION, R/colslegs.R, man/leglabs.Rd, man/sp2Mondrian.Rd,
+	  vignettes/combine_maptools.Rnw: reverse leglabs
+
+2015-04-24 10:26  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-04-24 10:25  rsbivand
+
+	* DESCRIPTION, R/checkHoles.R: remove gc() and rm() from checkHoles
+
+2015-04-23 10:19  rsbivand
+
+	* ChangeLog, inst/ChangeLog, svn2cl.xsl: tidy
+
+2015-04-20 13:21  rsbivand
+
+	* DESCRIPTION, R/checkHoles.R, R/sp2pbs.R, man/GE_SpatialGrid.Rd,
+	  man/kmlLine.Rd, man/kmlLines.Rd, man/kmlOverlay.Rd,
+	  man/nowrapRecenter.Rd: cleaning oddities, mostly adding +ellps=
+
+2015-04-13 07:55  rsbivand
+
+	* R/checkHoles.R, data/wrld_simpl.rda: tidy
+
+2015-04-13 06:06  edzer
+
+	* DESCRIPTION, man/SpatialLines2PolySet.Rd: version bump; adapt
+	  CRS() to sp 1.1-0 requirements: wgs->WGS, +ellps=WGS84
+
+2015-02-03 13:57  rsbivand
+
+	* DESCRIPTION, R/spmaps.R, man/map2SpatialPolygons.Rd,
+	  src/Rgshhs.c, src/shapefil.h: make map to SP hole checking
+	  optional
+
+2015-02-01 16:34  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-02-01 16:33  rsbivand
+
+	* DESCRIPTION: tidy
+
+2015-01-31 13:36  rsbivand
+
+	* DESCRIPTION, R/nowrapRecenter.R, R/spmaps.R,
+	  man/GE_SpatialGrid.Rd, man/dotsInPolys.Rd, man/readGPS.Rd,
+	  man/readSplus.Rd, man/sp2WB.Rd, man/sp2tmap.Rd,
+	  man/symbolsInPolys.Rd: checking all examples
+
+2015-01-30 16:36  rsbivand
+
+	* man/SpatialLines2PolySet.Rd: tidy
+
+2015-01-30 16:35  rsbivand
+
+	* DESCRIPTION: tidy
+
+2015-01-27 18:55  edzer
+
+	* R/DP.R, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
+	  R/nowrapRecenter.R, R/point_line_distance.R, R/sp2pbs.R,
+	  R/sp_spat1.R, R/spatstat1.R, R/union.R: solved all "no visible
+	  global function definition for" warnings by removing all
+	  require("xxx") calls.
+
+2014-08-06 18:53  rsbivand
+
+	* DESCRIPTION, R/sp2pbs.R, src/Rgshhs.c: PBS hole
+
+2014-06-05 15:18  rsbivand
+
+	* DESCRIPTION, R/AAA.R, R/point_line_distance.R, man/Rgshhs.Rd,
+	  man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
+	  man/readSplus.Rd, man/snapPointsToLines.Rd,
+	  man/unionSpatialPolygons.Rd, vignettes/combine_maptools.Rnw:
+	  rgeos-proof examples and vignette
+
+2014-02-19 16:53  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
 2014-02-19 16:51  rsbivand
 
-	* DESCRIPTION,
-	  inst/share/gshhs_c.b, inst/share/wdb_borders_c.b, man/Rgshhs.Rd:
-	  upgraded GSHHS files to 2.3.0
+	* DESCRIPTION, inst/share/gshhs_c.b, inst/share/wdb_borders_c.b,
+	  man/Rgshhs.Rd: upgraded GSHHS files to 2.3.0
 
 2014-01-28 19:02  rsbivand
 
-	* DESCRIPTION,
-	  R/point_line_distance.R: fix is/class issue in
+	* DESCRIPTION, R/point_line_distance.R: fix is/class issue in
 	  point_line_distance
 
 2014-01-22 09:42  rsbivand
 
-	* DESCRIPTION,
-	  R/point_line_distance.R, man/snapPointsToLines.Rd: update
-	  to snapPointsToLines
+	* DESCRIPTION, R/point_line_distance.R, man/snapPointsToLines.Rd:
+	  update to snapPointsToLines
 
 2013-09-01 18:06  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-30 11:38  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-30 11:37  rsbivand
 
-	* .Rbuildignore,
-	  DESCRIPTION: tidy
+	* .Rbuildignore, DESCRIPTION: tidy
 
 2013-08-29 18:49  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
-	  R/maptools.R, R/nowrapRecenter.R, R/sp_spat1.R, R/union.R:
-	  remove :::
+	* DESCRIPTION, NAMESPACE, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
+	  R/maptools.R, R/nowrapRecenter.R, R/sp_spat1.R, R/union.R: remove
+	  :::
 
 2013-08-07 11:17  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-07 11:15  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, man/pointLabelLattice.Rd, man/spCbind-methods.Rd:
-	  depends -> imports
+	* DESCRIPTION, NAMESPACE, man/pointLabelLattice.Rd,
+	  man/spCbind-methods.Rd: depends -> imports
 
 2013-07-02 19:01  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-07-02 19:01  rsbivand
 
-	* inst/LICENSE,
-	  inst/README: tidy
+	* inst/LICENSE, inst/README: tidy
 
 2013-07-02 18:00  rsbivand
 
-	* DESCRIPTION:
-	  tidy
+	* DESCRIPTION: tidy
 
 2013-07-02 17:56  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-07-02 17:48  rsbivand
 
-	* DESCRIPTION:
-	  tidy
+	* DESCRIPTION: tidy
 
 2013-06-27 20:50  edzer
 
-	* R/sp_spat1.R:
-	  brought back tess.
+	* R/sp_spat1.R: brought back tess.
 
 2013-06-27 20:46  edzer
 
-	* R/sp_spat1.R:
-	  removed class tess, which is used nor exported
+	* R/sp_spat1.R: removed class tess, which is used nor exported
 
 2013-06-25 17:11  rsbivand
 
-	* vignettes/combine_maptools.Rnw,
-	  vignettes/combine_maptools.pdf: adding footnote
+	* vignettes/combine_maptools.Rnw, vignettes/combine_maptools.pdf:
+	  adding footnote
 
 2013-06-21 12:52  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-06-21 12:50  rsbivand
 
-	* DESCRIPTION,
-	  man/CCmaps.Rd, man/kmlPoints.Rd, man/kmlPolygons.Rd,
+	* DESCRIPTION, man/CCmaps.Rd, man/kmlPoints.Rd, man/kmlPolygons.Rd,
 	  man/sun-methods.Rd: length of lines
 
 2013-06-20 18:20  rsbivand
 
-	* DESCRIPTION:
-	  adding vignette, kml functions
+	* DESCRIPTION: adding vignette, kml functions
 
 2013-06-20 18:16  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/kmlLines.R, R/kmlPolygons.R,
+	* DESCRIPTION, NAMESPACE, R/kmlLines.R, R/kmlPolygons.R,
 	  inst/shapes/co37_d90.dbf, inst/shapes/co37_d90.shp,
 	  inst/shapes/co37_d90.shx, inst/shapes/co45_d90.dbf,
 	  inst/shapes/co45_d90.shp, inst/shapes/co45_d90.shx,
@@ -120,404 +246,341 @@
 
 2013-03-30 12:53  rsbivand
 
-	* LICENSE,
-	  src/Rcentroid.c, src/Rgshhs.c, src/Rshapewrite1.c,
+	* LICENSE, src/Rcentroid.c, src/Rgshhs.c, src/Rshapewrite1.c,
 	  src/insiders.c, src/shapefil.h, src/shpopen.c, src/shptree.c:
 	  remove clang warnings
 
 2013-03-22 07:34  rsbivand
 
-	* man/map2SpatialPolygons.Rd:
-	  wgs84 -> WGS84 in map2SP help page
+	* man/map2SpatialPolygons.Rd: wgs84 -> WGS84 in map2SP help page
 
 2013-03-07 09:47  rsbivand
 
-	* R/Spatial-methods.R,
-	  R/SpatialLines-methods.R, R/SpatialPoints-methods.R,
-	  R/SpatialPolys-methods.R: block non-Spatial objects
+	* R/Spatial-methods.R, R/SpatialLines-methods.R,
+	  R/SpatialPoints-methods.R, R/SpatialPolys-methods.R: block
+	  non-Spatial objects
 
 2013-02-10 14:00  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-02-10 13:58  rsbivand
 
-	* .Rbuildignore:
-	  don't ship old_man
+	* .Rbuildignore: don't ship old_man
 
 2013-02-09 10:22  rsbivand
 
-	* DESCRIPTION,
-	  src/Rgshhs.c, src/Rshapeget.c, src/Rshapewrite1.c: C code
-	  warning cleanup; new-style contribs
+	* DESCRIPTION, src/Rgshhs.c, src/Rshapeget.c, src/Rshapewrite1.c: C
+	  code warning cleanup; new-style contribs
 
 2013-01-16 09:24  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-01-16 09:22  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R: move startup message to .onAttach
+	* DESCRIPTION, R/AAA.R: move startup message to .onAttach
 
 2013-01-04 00:36  oscarperpi
 
-	* man/lineLabel.Rd:
-	  Fixed description in lineLabel.Rd
+	* man/lineLabel.Rd: Fixed description in lineLabel.Rd
 
 2012-12-21 12:36  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-19 13:29  edzer
 
-	* DESCRIPTION,
-	  R/dotsinpolys.R: version bump, added URL dotsinpolygons: renamed
-	  sample.Polygons to spsample, so we can retire sample.Xxx in sp
+	* DESCRIPTION, R/dotsinpolys.R: version bump, added URL
+	  dotsinpolygons: renamed sample.Polygons to spsample, so we can
+	  retire sample.Xxx in sp
 
 2012-11-19 13:00  oscarperpi
 
-	* NAMESPACE:
-	  new method "label" for line labels
+	* NAMESPACE: new method "label" for line labels
 
 2012-11-19 12:59  oscarperpi
 
-	* man/lineLabel.Rd:
-	  new line labels examples added
+	* man/lineLabel.Rd: new line labels examples added
 
 2012-11-19 12:59  oscarperpi
 
-	* R/lineLabel.R:
-	  line label algorithm improved
+	* R/lineLabel.R: line label algorithm improved
 
 2012-11-12 09:25  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-12 09:24  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, R/CCmaps.R: fix bug in CCmaps
+	* ChangeLog, DESCRIPTION, R/CCmaps.R: fix bug in CCmaps
 
 2012-11-06 07:17  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, man/lineLabel.Rd, man/pointLabelLattice.Rd: add
-	  drawDetails.labels to NAMESPACE
+	* DESCRIPTION, NAMESPACE, man/lineLabel.Rd,
+	  man/pointLabelLattice.Rd: add drawDetails.labels to NAMESPACE
 
 2012-11-05 08:11  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-05 08:11  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/lineLabel.R, R/pointLabel.R, R/pointLabelBase.R,
-	  R/pointLabelLattice.R, man/lineLabel.Rd, man/pointLabel.Rd,
-	  man/pointLabelBase.Rd, man/pointLabelLattice.Rd, man/sp2WB.Rd:
-	  to UTF-8; adding lattice pointLabel
+	* DESCRIPTION, NAMESPACE, R/lineLabel.R, R/pointLabel.R,
+	  R/pointLabelBase.R, R/pointLabelLattice.R, man/lineLabel.Rd,
+	  man/pointLabel.Rd, man/pointLabelBase.Rd,
+	  man/pointLabelLattice.Rd, man/sp2WB.Rd: to UTF-8; adding lattice
+	  pointLabel
 
 2012-11-04 16:04  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-10-29 14:39  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R: branching in owin2Polygons on as.polygonal type
+	* DESCRIPTION, R/spatstat1.R: branching in owin2Polygons on
+	  as.polygonal type
 
 2012-08-22 12:35  rsbivand
 
-	* man/SpatialLines2PolySet.Rd,
-	  man/map2SpatialPolygons.Rd, man/pal2SpatialPolygons.Rd: make
-	  suggests if(require())
+	* man/SpatialLines2PolySet.Rd, man/map2SpatialPolygons.Rd,
+	  man/pal2SpatialPolygons.Rd: make suggests if(require())
 
 2012-08-09 12:58  rsbivand
 
-	* DESCRIPTION,
-	  R/Rgshhs.R, man/Rgshhs.Rd: Rgshhs SpatialCollections avoidance
+	* DESCRIPTION, R/Rgshhs.R, man/Rgshhs.Rd: Rgshhs SpatialCollections
+	  avoidance
 
 2012-07-22 13:10  rsbivand
 
-	* R/midpoint.R:
-	  correct midpoint data.frame
+	* R/midpoint.R: correct midpoint data.frame
 
 2012-06-29 08:45  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-06-08 20:10  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-06-08 20:08  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/midpoint.R, man/SpatialLinesMidPoints.Rd: add
-	  line midpoint
+	* DESCRIPTION, NAMESPACE, R/midpoint.R,
+	  man/SpatialLinesMidPoints.Rd: add line midpoint
 
 2012-05-09 08:12  rsbivand
 
-	* R/getKMLcoordinates.R:
-	  blanks in KML input
+	* R/getKMLcoordinates.R: blanks in KML input
 
 2012-05-04 08:29  rsbivand
 
-	* R/elide.R:
-	  copy comment in elide
+	* R/elide.R: copy comment in elide
 
 2012-05-03 11:09  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/point_line_distance.R, man/nearestPointOnLine.Rd,
-	  man/nearestPointOnSegment.Rd, man/snapPointsToLines.Rd: adding
-	  functions for snapping points to lines by German Carrillo
+	* DESCRIPTION, NAMESPACE, R/point_line_distance.R,
+	  man/nearestPointOnLine.Rd, man/nearestPointOnSegment.Rd,
+	  man/snapPointsToLines.Rd: adding functions for snapping points to
+	  lines by German Carrillo
 
 2012-02-06 09:13  rsbivand
 
-	* DESCRIPTION,
-	  man/Rgshhs.Rd: Rgshhs documentation
+	* DESCRIPTION, man/Rgshhs.Rd: Rgshhs documentation
 
 2012-01-27 12:29  rsbivand
 
-	* man/unionSpatialPolygons.Rd:
-	  fix documentation
+	* man/unionSpatialPolygons.Rd: fix documentation
 
 2012-01-15 13:15  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, inst/ChangeLog: tidy
+	* ChangeLog, DESCRIPTION, inst/ChangeLog: tidy
 
 2012-01-12 06:50  rsbivand
 
-	* man/SplashDams.Rd:
-	  updated source for splash dam data
+	* man/SplashDams.Rd: updated source for splash dam data
 
 2012-01-09 19:08  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/kmlPoints.R, data/SplashDams.rda,
+	* DESCRIPTION, NAMESPACE, R/kmlPoints.R, data/SplashDams.rda,
 	  man/SplashDams.Rd, man/kmlPoints.Rd: adding kmlPoints
 
 2012-01-02 18:14  rsbivand
 
-	* DESCRIPTION,
-	  data/state.vbm.rda, man/state.vbm.Rd: adding state.vbm
+	* DESCRIPTION, data/state.vbm.rda, man/state.vbm.Rd: adding
+	  state.vbm
 
 2011-12-19 09:01  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: upgrade GSHHS to 2.2.0
+	* ChangeLog, inst/ChangeLog: upgrade GSHHS to 2.2.0
 
 2011-12-19 09:00  rsbivand
 
-	* DESCRIPTION,
-	  inst/share/gshhs_c.b, inst/share/wdb_borders_c.b, man/Rgshhs.Rd,
-	  src/Rgshhs.c, src/Rgshhs.h: upgrade GSHHS to 2.2.0
+	* DESCRIPTION, inst/share/gshhs_c.b, inst/share/wdb_borders_c.b,
+	  man/Rgshhs.Rd, src/Rgshhs.c, src/Rgshhs.h: upgrade GSHHS to 2.2.0
 
 2011-11-17 08:19  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/spatstat1.R, man/as.ppp.Rd: adding
+	* DESCRIPTION, NAMESPACE, R/spatstat1.R, man/as.ppp.Rd: adding
 	  as.SpatialLines.psp
 
 2011-11-14 21:35  rsbivand
 
-	* DESCRIPTION,
-	  R/checkHoles.R, R/pointLabel.R, R/sun.R, src/shpopen.c:
-	  complete partial argument matches
+	* DESCRIPTION, R/checkHoles.R, R/pointLabel.R, R/sun.R,
+	  src/shpopen.c: complete partial argument matches
 
 2011-08-08 18:52  rsbivand
 
-	* man/readShapeLines.Rd,
-	  man/readShapePoints.Rd, man/readShapePoly.Rd,
-	  man/readShapeSpatial.Rd: link to write.dbf
+	* man/readShapeLines.Rd, man/readShapePoints.Rd,
+	  man/readShapePoly.Rd, man/readShapeSpatial.Rd: link to write.dbf
 
 2011-08-07 11:49  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: editing startup message
+	* ChangeLog, inst/ChangeLog: editing startup message
 
 2011-08-07 11:48  rsbivand
 
-	* R/AAA.R:
-	  editing startup message
+	* R/AAA.R: editing startup message
 
 2011-08-07 11:33  rsbivand
 
-	* inst/ChangeLog:
-	  editing startup message
+	* inst/ChangeLog: editing startup message
 
 2011-08-07 11:32  rsbivand
 
-	* ChangeLog:
-	  editing startup message
+	* ChangeLog: editing startup message
 
 2011-08-07 11:28  rsbivand
 
-	* NAMESPACE,
-	  man/Rgshhs.Rd, man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
-	  man/unionSpatialPolygons.Rd: editing startup message
+	* NAMESPACE, man/Rgshhs.Rd, man/checkPolygonsHoles.Rd,
+	  man/nowrapRecenter.Rd, man/unionSpatialPolygons.Rd: editing
+	  startup message
 
 2011-08-06 14:18  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, R/checkHoles.R: edited startup message
+	* DESCRIPTION, R/AAA.R, R/checkHoles.R: edited startup message
 
 2011-06-11 05:38  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: permit NA IDs in union
+	* ChangeLog, inst/ChangeLog: permit NA IDs in union
 
 2011-06-11 05:37  rsbivand
 
-	* DESCRIPTION,
-	  R/union.R, man/unionSpatialPolygons.Rd: permit NA IDs in union
+	* DESCRIPTION, R/union.R, man/unionSpatialPolygons.Rd: permit NA
+	  IDs in union
 
 2011-06-10 08:03  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: documenting unionSpatialPolygons change
+	* ChangeLog, inst/ChangeLog: documenting unionSpatialPolygons
+	  change
 
 2011-06-10 08:02  rsbivand
 
-	* DESCRIPTION:
-	  documenting unionSpatialPolygons change
+	* DESCRIPTION: documenting unionSpatialPolygons change
 
 2011-06-10 08:00  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: documenting unionSpatialPolygons change
+	* ChangeLog, inst/ChangeLog: documenting unionSpatialPolygons
+	  change
 
 2011-06-10 07:58  rsbivand
 
-	* man/unionSpatialPolygons.Rd:
-	  documenting unionSpatialPolygons change
+	* man/unionSpatialPolygons.Rd: documenting unionSpatialPolygons
+	  change
 
 2011-06-09 08:10  rsbivand
 
-	* DESCRIPTION,
-	  R/union.R, man/unionSpatialPolygons.Rd: added gUnaryUnion
-	  to unionSpatialPolygons
+	* DESCRIPTION, R/union.R, man/unionSpatialPolygons.Rd: added
+	  gUnaryUnion to unionSpatialPolygons
 
 2011-05-06 06:14  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2011-05-06 06:13  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R, man/as.ppp.Rd: superimpose correction
+	* DESCRIPTION, R/spatstat1.R, man/as.ppp.Rd: superimpose correction
 
 2011-04-29 06:29  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: change superimpose
+	* ChangeLog, inst/ChangeLog: change superimpose
 
 2011-04-29 06:28  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R: change superimpose
+	* DESCRIPTION, R/spatstat1.R: change superimpose
 
 2011-04-03 20:26  sluque
 
-	* R/sun-methods.R:
-	  Fix comments for proper outlining with allout.
+	* R/sun-methods.R: Fix comments for proper outlining with allout.
 
 2011-04-01 06:57  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R, man/as.ppp.Rd: marks fix for psp
+	* DESCRIPTION, R/spatstat1.R, man/as.ppp.Rd: marks fix for psp
 
 2011-03-30 14:48  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: more hole fixing
+	* ChangeLog, inst/ChangeLog: more hole fixing
 
 2011-03-30 14:48  rsbivand
 
-	* R/checkHoles.R,
-	  man/checkPolygonsHoles.Rd: more hole fixing
+	* R/checkHoles.R, man/checkPolygonsHoles.Rd: more hole fixing
 
 2011-03-29 12:45  rsbivand
 
-	* R/checkHoles.R:
-	  tree holes
+	* R/checkHoles.R: tree holes
 
 2011-03-29 08:24  rsbivand
 
-	* R/checkHoles.R:
-	  STRtree in hole check
+	* R/checkHoles.R: STRtree in hole check
 
 2011-03-28 13:14  rsbivand
 
-	* DESCRIPTION,
-	  R/checkHoles.R: try around gEquals in hole check
+	* DESCRIPTION, R/checkHoles.R: try around gEquals in hole check
 
 2011-03-28 08:25  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: add comments to wrld_simpl
+	* ChangeLog, inst/ChangeLog: add comments to wrld_simpl
 
 2011-03-28 08:24  rsbivand
 
-	* DESCRIPTION,
-	  data/wrld_simpl.rda: add comments to wrld_simpl
+	* DESCRIPTION, data/wrld_simpl.rda: add comments to wrld_simpl
 
 2011-03-23 13:50  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2011-03-23 13:50  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, inst/ChangeLog: tidy
+	* ChangeLog, DESCRIPTION, inst/ChangeLog: tidy
 
 2011-03-22 22:25  rsbivand
 
-	* data/wrld_simpl.rda:
-	  resave rda files
+	* data/wrld_simpl.rda: resave rda files
 
 2011-03-22 22:23  rsbivand
 
-	* data/gpcholes.rda,
-	  data/wrld_simpl.rda: resave rda files
+	* data/gpcholes.rda, data/wrld_simpl.rda: resave rda files
 
 2011-03-22 22:22  rsbivand
 
-	* data/gpcholes.rda,
-	  data/wrld_simpl.rda: resave rda files
+	* data/gpcholes.rda, data/wrld_simpl.rda: resave rda files
 
 2011-03-21 10:12  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: fix 2.13 Rd bugs
+	* ChangeLog, inst/ChangeLog: fix 2.13 Rd bugs
 
 2011-03-21 10:06  rsbivand
 
-	* DESCRIPTION,
-	  man/getKMLcoordinates.Rd, man/kmlLine.Rd, man/kmlPolygon.Rd:
-	  fix 2.13 Rd bugs
+	* DESCRIPTION, man/getKMLcoordinates.Rd, man/kmlLine.Rd,
+	  man/kmlPolygon.Rd: fix 2.13 Rd bugs
 
 2011-03-10 13:56  rsbivand
 
-	* R/sp2pbs.R,
-	  R/spmaps.R: PolySet2SpatialPolygons projection modification
+	* R/sp2pbs.R, R/spmaps.R: PolySet2SpatialPolygons projection
+	  modification
 
 2011-02-24 14:29  rsbivand
 
-	* R/CCmaps.R,
-	  R/DP.R, R/Rgshhs.R, R/SpatialLines-methods.R,
+	* R/CCmaps.R, R/DP.R, R/Rgshhs.R, R/SpatialLines-methods.R,
 	  R/SpatialPolys-methods.R, R/asciigrid.R, R/checkHoles.R,
 	  R/elide.R, R/gc_dist.R, R/kmlLine.R, R/kmlPolygon.R,
 	  R/maptools.R, R/readSplus.R, R/shapelib.R, R/sp2pbs.R,
@@ -526,109 +589,93 @@
 
 2011-02-11 09:42  rsbivand
 
-	* R/Rgshhs.R:
-	  Rgshhs intersection
+	* R/Rgshhs.R: Rgshhs intersection
 
 2011-02-06 14:48  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, src/shapefil.h, src/shpopen.c, src/shptree.c: suppress
-	  startup messages
+	* DESCRIPTION, R/AAA.R, src/shapefil.h, src/shpopen.c,
+	  src/shptree.c: suppress startup messages
 
 2011-01-02 14:25  rsbivand
 
-	* R/Rgshhs.R,
-	  man/Rgshhs.Rd: GSHHS 2.1.0 update
+	* R/Rgshhs.R, man/Rgshhs.Rd: GSHHS 2.1.0 update
 
 2010-12-31 15:43  rsbivand
 
-	* inst/share/gshhs_c.b:
-	  GSHHS 2.1.0 update
+	* inst/share/gshhs_c.b: GSHHS 2.1.0 update
 
 2010-12-31 15:37  rsbivand
 
-	* R/checkHoles.R,
-	  man/Rgshhs.Rd, src/Rgshhs.c: GSHHS 2.1.0 update
+	* R/checkHoles.R, man/Rgshhs.Rd, src/Rgshhs.c: GSHHS 2.1.0 update
 
 2010-12-16 10:46  rsbivand
 
-	* man/as.ppp.Rd,
-	  man/gzAzimuth.Rd, man/pal2SpatialPolygons.Rd,
+	* man/as.ppp.Rd, man/gzAzimuth.Rd, man/pal2SpatialPolygons.Rd,
 	  man/readShapeLines.Rd, man/readShapePoly.Rd,
 	  man/readShapeSpatial.Rd, man/readSplus.Rd,
 	  man/unionSpatialPolygons.Rd: use rownames for retrieving FIDs
 
 2010-12-16 10:27  rsbivand
 
-	* man/as.ppp.Rd,
-	  man/pal2SpatialPolygons.Rd, man/readShapePoly.Rd,
-	  man/readSplus.Rd, man/unionSpatialPolygons.Rd: use rownames
-	  for retrieving FIDs
+	* man/as.ppp.Rd, man/pal2SpatialPolygons.Rd, man/readShapePoly.Rd,
+	  man/readSplus.Rd, man/unionSpatialPolygons.Rd: use rownames for
+	  retrieving FIDs
 
 2010-11-30 17:37  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2010-11-30 00:10  edzer
 
-	* man/as.ppp.Rd,
-	  man/asciigrid.Rd: updated email address
+	* man/as.ppp.Rd, man/asciigrid.Rd: updated email address
 
 2010-11-24 13:40  rsbivand
 
-	* R/union.R:
-	  preparing for rgeos release
+	* R/union.R: preparing for rgeos release
 
 2010-11-24 12:32  rsbivand
 
-	* R/union.R,
-	  man/unionSpatialPolygons.Rd: preparing for rgeos release
+	* R/union.R, man/unionSpatialPolygons.Rd: preparing for rgeos
+	  release
 
 2010-11-24 09:11  rsbivand
 
-	* ChangeLog:
-	  preparing for rgeos release
+	* ChangeLog: preparing for rgeos release
 
 2010-11-24 09:09  rsbivand
 
-	* inst/ChangeLog:
-	  preparing for rgeos release
+	* inst/ChangeLog: preparing for rgeos release
 
 2010-11-24 09:08  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, R/DP.R, R/Rgshhs.R, R/checkHoles.R, R/nowrapRecenter.R,
-	  R/union.R, man/Rgshhs.Rd, man/checkPolygonsHoles.Rd,
-	  man/nowrapRecenter.Rd, man/thinnedSpatialPoly.Rd,
-	  man/unionSpatialPolygons.Rd: preparing for rgeos release
+	* DESCRIPTION, R/AAA.R, R/DP.R, R/Rgshhs.R, R/checkHoles.R,
+	  R/nowrapRecenter.R, R/union.R, man/Rgshhs.Rd,
+	  man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
+	  man/thinnedSpatialPoly.Rd, man/unionSpatialPolygons.Rd: preparing
+	  for rgeos release
 
 2010-11-18 07:53  rsbivand
 
-	* .Rbuildignore:
-	  add .Rbuildignore
+	* .Rbuildignore: add .Rbuildignore
 
 2010-11-18 04:30  sluque
 
-	* R/sun-methods.R,
-	  R/sun.R, man/sun-methods.Rd: Use match.arg() in sun methods,
-	  so that defaults actually work. Minor improvements to
-	  documentation.
+	* R/sun-methods.R, R/sun.R, man/sun-methods.Rd: Use match.arg() in
+	  sun methods, so that defaults actually work.
+	  
+	  Minor improvements to documentation.
 
 2010-11-17 15:49  rsbivand
 
-	* INDEX,
-	  svn2cl.xsl: initial clean
+	* INDEX, svn2cl.xsl: initial clean
 
 2010-11-17 15:49  rsbivand
 
-	* ChangeLog,
-	  oChangeLog: initial clean
+	* ChangeLog, oChangeLog: initial clean
 
 2010-11-17 15:45  rsbivand
 
-	* inst/shapes,
-	  inst/shapes/baltim.dbf, inst/shapes/baltim.shp,
+	* inst/shapes, inst/shapes/baltim.dbf, inst/shapes/baltim.shp,
 	  inst/shapes/baltim.shx, inst/shapes/columbus.dbf,
 	  inst/shapes/columbus.shp, inst/shapes/columbus.shx,
 	  inst/shapes/fylk-val-ll.dbf, inst/shapes/fylk-val-ll.shp,
@@ -636,58 +683,48 @@
 	  inst/shapes/fylk-val.shp, inst/shapes/fylk-val.shx,
 	  inst/shapes/pointZ.dbf, inst/shapes/pointZ.prj,
 	  inst/shapes/pointZ.shp, inst/shapes/pointZ.shx,
-	  inst/shapes/sids.dbf, inst/shapes/sids.shp,
-	  inst/shapes/sids.shx: initial clean
+	  inst/shapes/sids.dbf, inst/shapes/sids.shp, inst/shapes/sids.shx:
+	  initial clean
 
 2010-11-17 15:44  rsbivand
 
-	* inst/shapes:
-	  initial clean
+	* inst/shapes: initial clean
 
 2010-11-17 15:40  rsbivand
 
-	* .:
-	  initial clean
+	* .: initial clean
 
 2010-11-13 15:55  rsbivand
 
-	* adding
-	  getRgshhsMap
+	* adding getRgshhsMap
 
 2010-10-17 18:29  rsbivand
 
-	* ppp
-	  marks as data.frame not vector
+	* ppp marks as data.frame not vector
 
 2010-09-08 17:12  rsbivand
 
-	* zero
-	  nParts for lines
+	* zero nParts for lines
 
 2010-09-08 16:36  rsbivand
 
-	* zero
-	  nParts for lines
+	* zero nParts for lines
 
 2010-08-28 10:35  rsbivand
 
-	* as.double
-	  to storage.mode
+	* as.double to storage.mode
 
 2010-08-26 10:36  rsbivand
 
-	* check
-	  Sys.which value
+	* check Sys.which value
 
 2010-08-12 15:09  rsbivand
 
-	* data
-	  docs fix
+	* data docs fix
 
 2010-04-22 02:48  rsbivand
 
-	* read.shape
-	  filen without extension
+	* read.shape filen without extension
 
 2010-04-12 06:55  rsbivand
 
@@ -695,163 +732,131 @@
 
 2010-04-05 10:42  rsbivand
 
-	* comment
-	  out links to rgeos
+	* comment out links to rgeos
 
 2010-04-03 19:25  rsbivand
 
-	* hide
-	  rgeos
+	* hide rgeos
 
 2010-04-03 16:23  rsbivand
 
-	* DBF
-	  filename, GSHHS C code errors addressed
+	* DBF filename, GSHHS C code errors addressed
 
 2010-04-03 16:02  rsbivand
 
-	* DBF
-	  filename, GSHHS C code errors addressed
+	* DBF filename, GSHHS C code errors addressed
 
 2010-01-17 19:27  rsbivand
 
-	* change
-	  spRbind for SpatialPointsDataFrame objects
+	* change spRbind for SpatialPointsDataFrame objects
 
 2010-01-10 19:42  rsbivand
 
-	* gshhs
-	  hole fix
+	* gshhs hole fix
 
 2010-01-10 19:37  rsbivand
 
-	* gshhs
-	  hole fix
+	* gshhs hole fix
 
 2010-01-08 09:48  rsbivand
 
-	* hole
-	  assignment in GSHHS
+	* hole assignment in GSHHS
 
 2010-01-07 18:07  rsbivand
 
-	* rgeos
-	  integration
+	* rgeos integration
 
 2010-01-07 12:10  rsbivand
 
-	* rgeos
-	  integration
+	* rgeos integration
 
 2009-12-21 12:39  rsbivand
 
-	* adding
-	  CCmaps
+	* adding CCmaps
 
 2009-12-21 12:39  rsbivand
 
-	* adding
-	  CCmaps
+	* adding CCmaps
 
 2009-12-18 21:56  rsbivand
 
-	* GSHHS
-	  upgrade to 2.0
+	* GSHHS upgrade to 2.0
 
 2009-12-03 07:35  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-12-03 07:35  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-12-03 07:34  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-11-23 11:50  rsbivand
 
-	* reinstate
-	  getinfo.shape
+	* reinstate getinfo.shape
 
 2009-11-20 12:27  rsbivand
 
-	* moving
-	  deprecated functions from namespace
+	* moving deprecated functions from namespace
 
 2009-11-19 20:11  rsbivand
 
-	* adding
-	  thinnedSpatialPoly
+	* adding thinnedSpatialPoly
 
 2009-11-05 16:26  edzer
 
-	* moved
-	  spChFID method, functions and docs to package sp
+	* moved spChFID method, functions and docs to package sp
 
 2009-09-17 08:22  rsbivand
 
-	* fix
-	  documentation links
+	* fix documentation links
 
 2009-07-14 09:17  rsbivand
 
-	* KML
-	  WGS84 notes added
+	* KML WGS84 notes added
 
 2009-06-22 14:53  rsbivand
 
-	* changed
-	  all.equal to identical in closed ring forcing
+	* changed all.equal to identical in closed ring forcing
 
 2009-06-22 14:52  rsbivand
 
-	* changed
-	  all.equal to identical in closed ring forcing
+	* changed all.equal to identical in closed ring forcing
 
 2009-06-10 14:34  rsbivand
 
-	* more
-	  NULL geometry trapping
+	* more NULL geometry trapping
 
 2009-05-26 10:22  rsbivand
 
-	* coercion
-	  from owin/tess to SpatialPolygons
+	* coercion from owin/tess to SpatialPolygons
 
 2009-04-08 17:29  rsbivand
 
-	* improvements
-	  to spatstat support - Adrian Baddeley
+	* improvements to spatstat support - Adrian Baddeley
 
 2009-03-29 15:32  rsbivand
 
-	* drop=FALSE
-	  in reading line and polygon shapefiles
+	* drop=FALSE in reading line and polygon shapefiles
 
 2009-03-17 20:43  vir
 
-	* Minor
-	  fix to allow for a line with NA's just before the END.
+	* Minor fix to allow for a line with NA's just before the END.
 
 2009-03-10 17:24  rsbivand
 
-	* data
-	  web link
+	* data web link
 
 2009-02-18 12:00  rsbivand
 
-	* kml
-	  writing; GSHHS lines shift
+	* kml writing; GSHHS lines shift
 
 2009-02-18 11:58  rsbivand
 
-	* kml
-	  writing; GSHHS lines shift
+	* kml writing; GSHHS lines shift
 
 2009-02-05 17:45  rsbivand
 
@@ -859,28 +864,23 @@
 
 2009-02-05 15:39  rsbivand
 
-	* adding
-	  features to readSplus
+	* adding features to readSplus
 
 2009-02-05 13:39  rsbivand
 
-	* adding
-	  readSplus for WinBUGS
+	* adding readSplus for WinBUGS
 
 2009-01-20 14:39  rsbivand
 
-	* sun
-	  NULL tz
+	* sun NULL tz
 
 2008-11-13 14:07  rsbivand
 
-	* ...
-	  for readGPS()
+	* ... for readGPS()
 
 2008-11-13 14:06  rsbivand
 
-	* ...
-	  for readGPS()
+	* ... for readGPS()
 
 2008-11-12 14:55  rsbivand
 
@@ -892,28 +892,23 @@
 
 2008-08-14 09:09  rsbivand
 
-	* NULL
-	  bug in maps2SP
+	* NULL bug in maps2SP
 
 2008-06-27 08:17  rsbivand
 
-	* readSpatial
-	  wrapper
+	* readSpatial wrapper
 
 2008-06-19 05:57  rsbivand
 
-	* PolySet2SpatialLines
-	  UTM zone update
+	* PolySet2SpatialLines UTM zone update
 
 2008-05-24 17:18  rsbivand
 
-	* GSHHS
-	  support to 1.10
+	* GSHHS support to 1.10
 
 2008-05-24 16:27  rsbivand
 
-	* GSHHS
-	  support to 1.10
+	* GSHHS support to 1.10
 
 2008-04-14 20:49  rsbivand
 
@@ -929,8 +924,7 @@
 
 2008-04-13 16:47  rsbivand
 
-	* PBS
-	  to SP SID bug
+	* PBS to SP SID bug
 
 2008-04-10 14:07  rsbivand
 
@@ -938,18 +932,15 @@
 
 2008-04-04 17:59  rsbivand
 
-	* ABS
-	  nulls
+	* ABS nulls
 
 2008-04-04 17:59  rsbivand
 
-	* ABS
-	  nulls
+	* ABS nulls
 
 2008-03-30 19:48  rsbivand
 
-	* GSHHS
-	  clip
+	* GSHHS clip
 
 2008-03-03 21:47  rsbivand
 
@@ -957,53 +948,43 @@
 
 2008-02-09 12:42  rsbivand
 
-	* line
-	  lengths in help
+	* line lengths in help
 
 2008-01-30 20:53  rsbivand
 
-	* SG
-	  creation
+	* SG creation
 
 2008-01-30 08:26  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 11:36  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 11:00  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 10:37  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 09:52  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 09:03  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 08:50  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-20 15:08  rsbivand
 
-	* pbs
-	  to sp
+	* pbs to sp
 
 2007-12-13 17:32  rsbivand
 
@@ -1011,18 +992,15 @@
 
 2007-12-09 18:03  rsbivand
 
-	* elide
-	  shift
+	* elide shift
 
 2007-11-21 22:37  rsbivand
 
-	* elide
-	  bug
+	* elide bug
 
 2007-11-16 09:12  rsbivand
 
-	* GSHHS
-	  to 1.5
+	* GSHHS to 1.5
 
 2007-11-10 13:17  rsbivand
 
@@ -1030,13 +1008,11 @@
 
 2007-10-31 15:43  rsbivand
 
-	* thingy
-	  to slot
+	* thingy to slot
 
 2007-10-31 13:46  rsbivand
 
-	* thingy
-	  to slot
+	* thingy to slot
 
 2007-10-23 12:50  rsbivand
 
@@ -1048,23 +1024,19 @@
 
 2007-10-06 17:38  rsbivand
 
-	* elide
-	  first cut
+	* elide first cut
 
 2007-10-06 10:06  rsbivand
 
-	* elide
-	  first cut
+	* elide first cut
 
 2007-09-29 16:37  rsbivand
 
-	* pointLabel
-	  update
+	* pointLabel update
 
 2007-09-26 09:09  rsbivand
 
-	* Ascii
-	  Grid dec
+	* Ascii Grid dec
 
 2007-09-18 08:19  rsbivand
 
@@ -1072,28 +1044,23 @@
 
 2007-09-14 20:14  rsbivand
 
-	* Mondrian
-	  new format
+	* Mondrian new format
 
 2007-09-14 06:58  rsbivand
 
-	* pass
-	  through max_nchar
+	* pass through max_nchar
 
 2007-09-05 16:09  rsbivand
 
-	* double
-	  NA at end of map coords
+	* double NA at end of map coords
 
 2007-07-25 08:49  rsbivand
 
-	* 3D
-	  polylist, write line shape, owin poly
+	* 3D polylist, write line shape, owin poly
 
 2007-07-19 19:33  rsbivand
 
-	* 3D
-	  polylist writing
+	* 3D polylist writing
 
 2007-06-11 08:05  rsbivand
 
@@ -1109,13 +1076,11 @@
 
 2007-06-05 13:31  rsbivand
 
-	* con
-	  correction
+	* con correction
 
 2007-05-08 16:35  rsbivand
 
-	* revert
-	  spatstat coerce
+	* revert spatstat coerce
 
 2007-05-07 08:55  rsbivand
 
@@ -1123,28 +1088,23 @@
 
 2007-04-28 19:41  rsbivand
 
-	* doc
-	  error
+	* doc error
 
 2007-04-27 16:37  rsbivand
 
-	* resolve
-	  GPS conflict
+	* resolve GPS conflict
 
 2007-04-21 04:27  rsbivand
 
-	* GE
-	  dimnames
+	* GE dimnames
 
 2007-04-16 04:01  rsbivand
 
-	* sp
-	  problem and gps
+	* sp problem and gps
 
 2007-04-16 02:40  rsbivand
 
-	* sp
-	  problem and gps
+	* sp problem and gps
 
 2007-03-29 14:34  rsbivand
 
@@ -1156,33 +1116,27 @@
 
 2007-02-09 20:09  rsbivand
 
-	* force_ring
-	  in readShapePoly
+	* force_ring in readShapePoly
 
 2007-02-01 14:28  rsbivand
 
-	* sun
-	  manual tidy
+	* sun manual tidy
 
 2007-01-21 10:50  rsbivand
 
-	* GE_PNG
-	  additions
+	* GE_PNG additions
 
 2007-01-20 21:36  rsbivand
 
-	* GE_PNG
-	  additions
+	* GE_PNG additions
 
 2007-01-16 09:39  rsbivand
 
-	* im
-	  and sun-methods
+	* im and sun-methods
 
 2007-01-16 09:23  rsbivand
 
-	* im
-	  and sun-methods
+	* im and sun-methods
 
 2006-12-02 15:38  rsbivand
 
@@ -1198,38 +1152,31 @@
 
 2006-10-31 13:07  rsbivand
 
-	* sun
-	  and r-spatial integration
+	* sun and r-spatial integration
 
 2006-10-31 08:31  rsbivand
 
-	* sun
-	  and r-spatial integration
+	* sun and r-spatial integration
 
 2006-10-29 13:53  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-28 19:56  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-28 17:23  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-19 20:03  rsbivand
 
-	* dostInPolys
-	  NULL
+	* dostInPolys NULL
 
 2006-09-21 19:42  rsbivand
 
-	* R
-	  2.4.0
+	* R 2.4.0
 
 2006-08-30 14:50  rsbivand
 
@@ -1241,13 +1188,11 @@
 
 2006-05-02 07:07  rsbivand
 
-	* Geolytics
-	  bug
+	* Geolytics bug
 
 2006-04-10 19:21  rsbivand
 
-	* fix
-	  to sp2WB, readAsciiGrid, writeAsciiGrid
+	* fix to sp2WB, readAsciiGrid, writeAsciiGrid
 
 2006-03-20 08:32  rsbivand
 
@@ -1259,8 +1204,7 @@
 
 2006-03-01 08:53  rsbivand
 
-	* checks
-	  on polylists
+	* checks on polylists
 
 2006-01-11 11:08  rsbivand
 
@@ -1276,18 +1220,15 @@
 
 2006-01-08 21:23  rsbivand
 
-	* adding
-	  sp2tmap
+	* adding sp2tmap
 
 2006-01-08 18:34  rsbivand
 
-	* adding
-	  sp2tmap
+	* adding sp2tmap
 
 2005-12-15 15:00  rsbivand
 
-	* to
-	  5-4
+	* to 5-4
 
 2005-12-12 21:27  rsbivand
 
@@ -1295,33 +1236,27 @@
 
 2005-10-03 17:44  rsbivand
 
-	* lines
-	  bugs
+	* lines bugs
 
 2005-09-14 21:08  rsbivand
 
-	* as
-	  at 0.5-2
+	* as at 0.5-2
 
 2005-09-13 17:24  rsbivand
 
-	* remove
-	  suggested splancs
+	* remove suggested splancs
 
 2005-09-13 14:53  rsbivand
 
-	* remove
-	  suggested splancs
+	* remove suggested splancs
 
 2005-09-09 14:28  rsbivand
 
-	* ...
-	  in plot.Map
+	* ... in plot.Map
 
 2005-09-08 20:28  rsbivand
 
-	* dotsinpolys
-	  begun
+	* dotsinpolys begun
 
 2005-09-08 11:11  rsbivand
 
@@ -1333,26 +1268,21 @@
 
 2005-09-05 09:00  rsbivand
 
-	* removing
-	  _
+	* removing _
 
 2005-09-03 16:19  rsbivand
 
-	* added
-	  ...  to degAxis()
+	* added ... to degAxis()
 
 2005-09-02 07:40  rsbivand
 
-	* more
-	  asciigrid
+	* more asciigrid
 
 2005-09-01 18:26  rsbivand
 
-	* Initial
-	  revision
+	* Initial revision
 
-2005-09-01 18:26
+2005-09-01 18:26  
 
-	* New
-	  repository initialized by cvs2svn.
+	* New repository initialized by cvs2svn.
 
diff --git a/DESCRIPTION b/DESCRIPTION
index f801c2f..f710061 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,13 +1,14 @@
 Package: maptools
-Version: 0.8-30
-Date: 2014-06-05
-Title: Tools for reading and handling spatial objects
+Version: 0.8-39
+Date: 2016-01-28
+Title: Tools for Reading and Handling Spatial Objects
 Authors at R: c(
 	person("Roger", "Bivand", role = c("cre", "aut"), email = "Roger.Bivand at nhh.no"),
 	person("Nicholas", "Lewin-Koh", role = "aut"),
 	person("Edzer", "Pebesma", role = "ctb"),
 	person("Eric", "Archer", role = "ctb"),
 	person("Adrian", "Baddeley", role = "ctb"),
+	person("Nick", "Bearman", role = "ctb"),
 	person("Hans-Jörg", "Bibiko", role = "ctb"),
 	person("Steven", "Brey", role = "ctb"),
 	person("Jonathan", "Callahan", role = "ctb"),
@@ -21,9 +22,11 @@ Authors at R: c(
 	person("Patrick", "Hausmann", role = "ctb"),
 	person("Karl Ove", "Hufthammer", role = "ctb"),
 	person("Thomas", "Jagger", role = "ctb"),
+	person("Kent", "Johnson", role = "ctb"),
 	person("Sebastian", "Luque", role = "ctb"),
 	person("Don", "MacQueen", role = "ctb"),
 	person("Andrew", "Niccolai", role = "ctb"),
+	person("Edzer", "Pebesma", role = "ctb"),
 	person("Oscar", "Perpiñán Lamigueiro", role = "ctb"),
 	person("Tom", "Short", role = "ctb"),
 	person("Greg", "Snow", role = "ctb"),
@@ -32,19 +35,22 @@ Authors at R: c(
 	person("Rolf", "Turner", role = "ctb"))
 Encoding: UTF-8
 Depends: R (>= 2.10), sp (>= 1.0-11)
-Imports: foreign (>= 0.8), methods, grid, lattice, stats
-Suggests: rgeos (>= 0.1-8), spatstat (>= 1.18), PBSmapping,
-        RColorBrewer
-Enhances: maps, gpclib, RArcInfo
+Imports: foreign (>= 0.8), methods, grid, lattice, stats, utils,
+        grDevices
+Suggests: rgeos (>= 0.1-8), spatstat (>= 1.18), PBSmapping, maps,
+        RColorBrewer, raster, polyclip
+Enhances: gpclib, RArcInfo
 Description: Set of tools for manipulating and reading geographic data, in particular ESRI shapefiles; C code used from shapelib. It includes binary access to GSHHG shoreline files. The package also provides interface wrappers for exchanging spatial objects with packages such as PBSmapping, spatstat, maps, RArcInfo, Stata tmap, WinBUGS, Mondrian, and others.
 License: GPL (>= 2)
 URL: http://r-forge.r-project.org/projects/maptools/
-Packaged: 2014-06-05 18:02:47 UTC; rsb
+NeedsCompilation: yes
+Packaged: 2016-01-29 08:38:18 UTC; rsb
 Author: Roger Bivand [cre, aut],
   Nicholas Lewin-Koh [aut],
   Edzer Pebesma [ctb],
   Eric Archer [ctb],
   Adrian Baddeley [ctb],
+  Nick Bearman [ctb],
   Hans-Jörg Bibiko [ctb],
   Steven Brey [ctb],
   Jonathan Callahan [ctb],
@@ -58,9 +64,11 @@ Author: Roger Bivand [cre, aut],
   Patrick Hausmann [ctb],
   Karl Ove Hufthammer [ctb],
   Thomas Jagger [ctb],
+  Kent Johnson [ctb],
   Sebastian Luque [ctb],
   Don MacQueen [ctb],
   Andrew Niccolai [ctb],
+  Edzer Pebesma [ctb],
   Oscar Perpiñán Lamigueiro [ctb],
   Tom Short [ctb],
   Greg Snow [ctb],
@@ -68,6 +76,5 @@ Author: Roger Bivand [cre, aut],
   Murray Stokely [ctb],
   Rolf Turner [ctb]
 Maintainer: Roger Bivand <Roger.Bivand at nhh.no>
-NeedsCompilation: yes
 Repository: CRAN
-Date/Publication: 2014-06-05 21:54:33
+Date/Publication: 2016-01-30 00:08:33
diff --git a/MD5 b/MD5
index ff5810b..0fb74c5 100644
--- a/MD5
+++ b/MD5
@@ -1,70 +1,71 @@
-274498bda34adbc7317c5946b272cac1 *ChangeLog
-cdc8499b2e114513bb7527419f59a53c *DESCRIPTION
-40c3f2d138443e62202410f87d47f232 *NAMESPACE
+88bb01d7ff9cbe9670db7e17ae7823ef *ChangeLog
+14ca7484164b6e375571b2c3f3d32d1b *DESCRIPTION
+4d4a9bdb4985c6a95a4b81c62a35a446 *NAMESPACE
 c7584403c09826f9a2f952d28541b2ec *R/AAA.R
 1399d0064b46e6e6c90600b1b64a5e19 *R/CCmaps.R
-5848792717e41318276dbe13f75315b7 *R/DP.R
+d7210b92daad70dc7a3f7b10f676ccff *R/DP.R
 b52e6bfd6272c6c26bec32d86332d830 *R/GE_png.R
-0dcb5d38c0129ccb89508ca919297264 *R/Rgshhs.R
-e2a4c50e82b203053bdc6ca6fdefccfb *R/SP2owin.R
+572e14ea801965cb8fc3dca7626b5a2e *R/Rgshhs.R
+2b7491b50b98b8833a1a6b66e09f1ef6 *R/SP2owin.R
 93ee865cd4ab71a928f723859bccb51b *R/Spatial-methods.R
 dff36c678d648acbf4511bdcf686d6e8 *R/SpatialLines-methods.R
 d1765912c4fc95d78b6c51cc1463cb94 *R/SpatialPoints-methods.R
 238a44d907e5a2a7c8bdd39c21f24b57 *R/SpatialPolys-methods.R
 b554d8957790bcf7444ab442fe57648c *R/asciigrid.R
 e29845deee219ec6442657468249b233 *R/azimuth.R
-2e6d402918e27b9ef5ca2c08311fb155 *R/checkHoles.R
-26a3fc11f1fca539879d3f115d2b444b *R/colslegs.R
+8f483fe499d7bbe845b715d052c7e79e *R/checkHoles.R
+01b3112c44fc6e40a5cd526b2d38bbcf *R/colslegs.R
 0aeb9b76c865d15b173bdb5ac052692a *R/dotsinpolys.R
 08fee92d40b987ffe9af7c4ec17c58ad *R/elide.R
 148df8cfbd7dadceba256df8d37d9ab0 *R/gc_dist.R
-a9f9233e0515d09b17d77d785f4d0312 *R/getKMLcoordinates.R
+35a3db4e3e05286b36957de84c15a741 *R/getKMLcoordinates.R
 3a28225f27e2c7a6531411d4fe27ac7f *R/kmlLine.R
 2d3ab1aba7162799d44681126d595d1a *R/kmlLines.R
-4f0724c5f0fd055529d99e1f3798bec3 *R/kmlPoints.R
+9b6bbb4d46a9cd4ecd0b889d3445bda9 *R/kmlPoints.R
 7686ded0d450e1b142ae99628284c1c9 *R/kmlPolygon.R
 f12f43e39b656317955dbef67381ce5e *R/kmlPolygons.R
 b5aec75cdeab2607fc41d781cb80f1ca *R/lineLabel.R
 eeb395e7f576fca09fce5ad04b92c0d7 *R/maptools.R
 e32451be693afaa6914ccb3a414ef9d2 *R/maptoolsChanges.R
 dec461da52968b8289e55fc84925c5fd *R/midpoint.R
-a766faa83e4ba7829a28b035bc7ea524 *R/nowrapRecenter.R
+bee6b74de2692e0096f502652555af0e *R/nowrapRecenter.R
 6e337a6093b17b645e62e0abf773f975 *R/pcent.R
 d0e87ce6ba53ad5163677147d0a584a1 *R/plot.Map.R
 b1733b14cbc627504bd3564e87b6213b *R/point.in.polygon.R
 5bcacd845d507f477e7b960f82cc4f58 *R/pointLabelBase.R
 64bd10616719e5aff5cbe232a354e829 *R/pointLabelLattice.R
-a0dc5cb12ae9c727fa509b77569654ad *R/point_line_distance.R
+c005489717f49d3adfcde7cb8a8abc01 *R/point_line_distance.R
 3ea318f87d9fbe32693557d502f7dcee *R/readGPS.R
 4ce28933f9aaee54b7c0e2d718b2a2e5 *R/readSplus.R
 254297162508942d87ed1f7f0dd64a85 *R/shapelib.R
 27e9edece00045b78668d74107cd13b7 *R/sp2Mondrian.R
 2a3967d5eedb7198176c667d87866473 *R/sp2WB.R
-30ae94c4a694f983c4b710aaa80e4636 *R/sp2pbs.R
+92909a825dec78d57e82fa8264e078c2 *R/sp2pbs.R
 293eab37398f4ea65b421b8091bd569e *R/sp2tmap.R
 1f59cf510bc07e7029d3161ec42b5de4 *R/sp_bind.R
-c3f8575c811e1aaf0fe6380379209479 *R/sp_spat1.R
+7be144fa4bda7166bd40d9ee0b2d3240 *R/sp_spat1.R
 e9943f26d6c56f3ba69d60ba6652e9e4 *R/sp_tools.R
-a1f3e3ac4a74a5e2848a5aa706c84d71 *R/spatstat1.R
-51749751c1f05788c2dda6369e19a203 *R/spmaps.R
+96029f5cb80e3f89dc8baf41e68fc0dd *R/spatstat1.R
+2b86414d49191e28226955b1b479740d *R/spmaps.R
 beb695c582d1c3aaa519cedd375e2c38 *R/subset.R
 4d3c2cab1f163eacf26bfd66161f0440 *R/sun-methods.R
 7149e328828e259e39b14f0a2bdf5c1b *R/sun.R
-0bf04c1d531f8b4a5eb4493b5b926838 *R/union.R
+7abdc8ab97cb14f48d1c2fd8962148a2 *R/union.R
 89e84c8fec40a5e2d0482ae8642a5244 *R/zzz.R
-a108b7622d61cdbf91a14fd6f812cb9c *build/vignette.rds
+e76534459020e69c4f18f90ee36a470d *build/vignette.rds
 d0b8c2ac5cb2ac40fff68a7b329df381 *data/SplashDams.rda
 ad794d2bb004f79c29d6d20a9341a0ec *data/gpcholes.rda
 f58d7bbadb55463c773ef91b74f7e6cf *data/state.vbm.rda
-b11b2dc736e768c927211d6fce5ab7df *data/wrld_simpl.rda
-274498bda34adbc7317c5946b272cac1 *inst/ChangeLog
-f36f02b8e559e17e5d2e56210d8f8358 *inst/README
+6986d6b0b1be13fff069ed7ad55c6184 *data/wrld_simpl.rda
+88bb01d7ff9cbe9670db7e17ae7823ef *inst/ChangeLog
+9dcaa361f3f79d17885b738121fc669e *inst/README
 0d1e185186bdb70959760c0a63f7be4f *inst/changes
-7b72d500d880be91bd3507a91ea2265f *inst/doc/combine_maptools.R
-541f7be428b60c34f0201f3d99fe13a7 *inst/doc/combine_maptools.Rnw
-7145e9094b018948b407aaafe0bae241 *inst/doc/combine_maptools.pdf
+b358c2168f0fb80129000e8a46943a49 *inst/doc/combine_maptools.R
+2e20fa712d38ce5c0670ee48a2459ee3 *inst/doc/combine_maptools.Rnw
+ac3e9abb1871d168c679b7f3cf979c74 *inst/doc/combine_maptools.pdf
 ef247b6c335e75e48f81da7ef7554fa6 *inst/grids/simple.ag
 15c2101eb916ea116f400d560f73dd7c *inst/grids/test.ag
+17238eca9084a1321e2dc9a719ef8dd6 *inst/shapes/Testing.kml
 be9a3966e14428c7c83c6a0fa745baaa *inst/shapes/baltim.dbf
 8ed6c81148522bb43464e0ea30489099 *inst/shapes/baltim.shp
 7f69b41aa1254188cd450efaaf4f6b8c *inst/shapes/baltim.shx
@@ -101,57 +102,58 @@ e3fb11232e6cb27770d15aaf4f632aa4 *inst/share/nc_xtra.dbf
 e0cca3b24f2b8a921921a81d7f883e30 *inst/share/wdb_borders_c.b
 fee837a72aedce6b5c90966fd5e45f30 *man/CCmaps.Rd
 f85df7425d7f27dfc69832b69edd86f2 *man/ContourLines2SLDF.Rd
-5ad9bfb6296b6c8488c7d8644a3c1de1 *man/GE_SpatialGrid.Rd
+d861a2857e10cb434cd69362cb00d5e2 *man/GE_SpatialGrid.Rd
 42b00d72e43c99e5fd62fdcd27948918 *man/Rgshhs.Rd
-9c8d32a1a4db3e63600de7b91d0cff44 *man/SpatialLines2PolySet.Rd
+0ecc5e028768f75ed7c7d145039f369b *man/SpatialLines2PolySet.Rd
 94cade77d4574f0150a68af47e86ca01 *man/SpatialLinesMidPoints.Rd
 5dd0471f34d8645c1a41916a4f7b6a31 *man/SplashDams.Rd
-f7e0c617483ff82aaa7436adf262d586 *man/as.ppp.Rd
+5a2896ab4f7fc0e738b29692aed4213d *man/as.ppp.Rd
 c67196d773b35e38abc31670b5481096 *man/asciigrid.Rd
 16636a542afe049937d1ee35ce705ed6 *man/checkPolygonsHoles.Rd
-0ba43dbf573ef51669d7ad2922a1af3c *man/dotsInPolys.Rd
+00bef445a8685e03cf1cc5da3cddd047 *man/dotsInPolys.Rd
 9e39e06ce97aa7407879a00def515fc7 *man/elide-methods.Rd
 950743858326fd33e6c180a315cde063 *man/gcDestination.Rd
-341b579f66d63b3ffcfe73622588dc3d *man/getKMLcoordinates.Rd
+11383660803b384a22b411c997173b26 *man/getKMLcoordinates.Rd
 e455cbefaf6d3970b24081a7c02d8fa3 *man/getinfo.shape.Rd
-96c5eb42c51c44dfc1ce301a3df4347b *man/gzAzimuth.Rd
+b5199f00d194cb391e5b7ee21c0a34fa *man/gzAzimuth.Rd
 5fa1da9264c3fcb8c7936e23b2514180 *man/holepolys.Rd
-8b8ecf1e0a835f24842c838b2ada0d91 *man/kmlLine.Rd
-762152ce9ff1877169657109aff34a30 *man/kmlLines.Rd
-21b39cbcb1d236065117a19ed9a320a9 *man/kmlOverlay.Rd
-9291418666f9c921df9e463e56e0ac0c *man/kmlPoints.Rd
+ad91038e9089402e05d5c44b17bf3ae2 *man/kmlLine.Rd
+3c9df935418e55541cc7ec99f014d698 *man/kmlLines.Rd
+f83107173e8093d64f3863d01029a8e9 *man/kmlOverlay.Rd
+7e553831d9b4a5bc03eedb334d198e1f *man/kmlPoints.Rd
 795ee68785451f2fc7623bcd003a43fd *man/kmlPolygon.Rd
 2f59365e555612d1f0c6cbfee8b29229 *man/kmlPolygons.Rd
-5aee594b0203b637510fe71e1ce2bda3 *man/leglabs.Rd
+f7f3dcf223fd61bc379dbac96db030f3 *man/leglabs.Rd
 c5f20bfb6b29271ed4868200d37d5b95 *man/lineLabel.Rd
-5a4a4b9e30c33f6fda7562f9139d6c84 *man/map2SpatialPolygons.Rd
+29b95da90f7c11ba8b8e932a77d8a57a *man/map2SpatialPolygons.Rd
 faeaff841d01f23c46e359dcac2f95e0 *man/nearestPointOnLine.Rd
 4c4dfe73ec4e6c87be454a6f0cb53f0a *man/nearestPointOnSegment.Rd
-371eb0566fdd1a72bf58d5eff400f1b9 *man/nowrapRecenter.Rd
+c36646e1bfddab22e519229756e230d2 *man/nowrapRecenter.Rd
+c7076249d8e47f81debbb586b017e12d *man/nowrapSpatialLines.Rd
 e941e4c0fe856263cca3eeafd3a81c09 *man/pal2SpatialPolygons.Rd
 2192d5eded3e8cea9af4c39a6c90fb50 *man/pointLabelBase.Rd
 742213470de35c3663880b6e44dc6479 *man/pointLabelLattice.Rd
 e54eef37d626acea8c6350db5fe2219d *man/ppp.Rd
-1d23bfed4495b2ed9526fe9d81b31b67 *man/readGPS.Rd
+054469158d9619be987506d252317853 *man/readGPS.Rd
 5a5a29a3a575bb8b499954e53a7ee819 *man/readShapeLines.Rd
 e0c09bc46d251ecac95df41134b868ed *man/readShapePoints.Rd
 c4854a1684e89709b27f5335a05ece11 *man/readShapePoly.Rd
 ac2a0d238e65e9587660a0df4796fe9f *man/readShapeSpatial.Rd
-3fd81944327fef01bf9dd9592b69ab42 *man/readSplus.Rd
+4c502b5ea99e96427d6366f087518920 *man/readSplus.Rd
 34aaa76f9b59b6c4ca112bdd7fd0b3e8 *man/snapPointsToLines.Rd
-c8a374183fc3f7fb622485c5b7f36938 *man/sp2Mondrian.Rd
-20f2d2c2d1c070d7b2fefc9e1556cc5a *man/sp2WB.Rd
-5b5be2484b2a7bb15e6e4eaddc60c621 *man/sp2tmap.Rd
+b07ace353d0083f2416e0bf2c10a2a60 *man/sp2Mondrian.Rd
+c73efbd40802c6c8f946cf22a05c37ae *man/sp2WB.Rd
+1209af0a42073f5c49e7e4aefd2e1162 *man/sp2tmap.Rd
 8cd390f284ba7ccab043de264d9cd2cc *man/spCbind-methods.Rd
 38877ece5e77bf053bc5cc2031c7c2ad *man/spRbind-methods.Rd
 024209da5ee31a795eaa70cafa7743f8 *man/state.vbm.Rd
 416aa7a72cba7c81039f7bf299d7684a *man/sun-methods.Rd
-82b7bf65f37a77094bc0eece339d5a67 *man/symbolsInPolys.Rd
+51e5e821c80a420c855326e89a5d2aec *man/symbolsInPolys.Rd
 71a1b2f0e6652e19f21cc60fdf44d235 *man/thinnedSpatialPoly.Rd
 60b736f9f720031b6500d961a7e52d3a *man/unionSpatialPolygons.Rd
-07568c79ba78dfd739f910d93048aa07 *man/wrld_simpl.Rd
+5169e4ab24b0d47bf890c053a08054b7 *man/wrld_simpl.Rd
 a93e5376f63cad9adb25e730dde1a507 *src/Rcentroid.c
-0488948734e012df8d08f0ef4fb40d4d *src/Rgshhs.c
+7004446088595bde11b6502c292f0b7b *src/Rgshhs.c
 9509debecc4e83e39be501a04c003f11 *src/Rgshhs.h
 1124203648658a3692a1192c8c8891d7 *src/Rshapeget.c
 496830d11d266228fbf847eaab8abcad *src/Rshapeinfo.c
@@ -159,8 +161,8 @@ a93e5376f63cad9adb25e730dde1a507 *src/Rcentroid.c
 a9508ad124e53a1f817a63d531161727 *src/Rshapewrite1.c
 c383e3e31bd88ca270cbe9eaf7c24f21 *src/insiders.c
 b44b2e8ded1a882d916425b5707186cc *src/maptools.h
-bbf80b23dc8a7c63da8d19faab5ee5fc *src/pip.c
-8fd84193665f90476d13388bb659e73c *src/shapefil.h
+416137da8f59d274e312612670fb17cb *src/pip.c
+87a2ae7ea33b16f2d57f9d62a9fbb3fa *src/shapefil.h
 67515ce4dccb71bedbd909c6ced064aa *src/shpopen.c
 5d1ad4fd5a7cc9749b0d56c1212efe40 *src/shptree.c
-541f7be428b60c34f0201f3d99fe13a7 *vignettes/combine_maptools.Rnw
+2e20fa712d38ce5c0670ee48a2459ee3 *vignettes/combine_maptools.Rnw
diff --git a/NAMESPACE b/NAMESPACE
index b463213..db61126 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -4,7 +4,10 @@ import(sp)
 import(foreign)
 import(grid)
 importFrom(lattice, strip.custom, trellis.grobname, trellis.par.get, llines)
-importFrom(stats, smooth.spline)
+importFrom(stats, smooth.spline, runif, na.omit, median, quantile, predict)
+importFrom(utils, read.table, write.table, packageVersion, compareVersion, packageDescription)
+importFrom(graphics, image, polygon, par, text, rect, points, lines, box, strwidth, strheight)
+importFrom(grDevices, hsv, col2rgb, as.graphicsAnnot, xy.coords)
 import(methods)
 
 export(leglabs, dotsInPolys, symbolsInPolys, getinfo.shape, print.shapehead) 
@@ -38,13 +41,13 @@ exportMethods("crepuscule", "sunriset", "solarnoon", "solarpos")
 export(SpatialPolygons2PolySet, SpatialLines2PolySet, PolySet2SpatialPolygons, PolySet2SpatialLines, map2SpatialPolygons, map2SpatialLines, pruneMap)
 
 export(as.ppp.SpatialPoints, as.ppp.SpatialPointsDataFrame, as.SpatialPoints.ppp, as.SpatialPointsDataFrame.ppp, as.SpatialGridDataFrame.ppp)
-export(as.owin.SpatialGridDataFrame, as.owin.SpatialPixelsDataFrame, as.owin.SpatialPolygons, as.SpatialGridDataFrame.im, as.im.SpatialGridDataFrame)
+export(as.owin.SpatialGridDataFrame, as.owin.SpatialPixelsDataFrame, as.owin.SpatialPolygons, as.SpatialGridDataFrame.im, as.im.SpatialGridDataFrame, as.im.RasterLayer)
 
 export(as.psp.SpatialLinesDataFrame, as.psp.SpatialLines, as.psp.Lines, as.psp.Line, as.SpatialLines.psp)
 
 export(gpclibPermit, gpclibPermitStatus, rgeosStatus)
 
-export(unionSpatialPolygons, nowrapSpatialPolygons, nowrapRecenter, checkPolygonsHoles)
+export(unionSpatialPolygons, nowrapSpatialPolygons, nowrapRecenter, checkPolygonsHoles, nowrapSpatialLines)
 
 export(Rgshhs, getRgshhsMap)
 
diff --git a/R/DP.R b/R/DP.R
index f796d08..0db48b4 100644
--- a/R/DP.R
+++ b/R/DP.R
@@ -103,8 +103,10 @@ thinnedSpatialPoly <- function(SP, tolerance, minarea=0, topologyPreserve=FALSE,
     stopifnot(inherits(SP, "SpatialPolygons"))
     rgeosI <- rgeosStatus()
     if (rgeosI && !avoidGEOS) {
-        require(rgeos)
-        res <- gSimplify(spgeom=SP, tol=tolerance, topologyPreserve=topologyPreserve)
+        # require(rgeos)
+    	if (!requireNamespace("rgeos", quietly = TRUE))
+			stop("package rgeos required for tinnedSpatialPoly")
+        res <- rgeos::gSimplify(spgeom=SP, tol=tolerance, topologyPreserve=topologyPreserve)
     } else {
       pls <- slot(SP, "polygons")
       pls_dp <- vector(mode="list", length=length(pls))
diff --git a/R/Rgshhs.R b/R/Rgshhs.R
index 25d8062..f26febc 100644
--- a/R/Rgshhs.R
+++ b/R/Rgshhs.R
@@ -27,10 +27,14 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
 	else clip <- NULL
         rgeosI <- rgeosStatus()
         if (rgeosI && !avoidGEOS) {
-            require(rgeos)
+            # require(rgeos)
+    		if (!requireNamespace("rgeos", quietly = TRUE))
+				stop("rgeos spatstat required for Rgshhs")
         } else {
             stopifnot(isTRUE(gpclibPermitStatus()))
-	    require("gpclib")
+    		if (!requireNamespace("gpclib", quietly = TRUE))
+				stop("gpclib spatstat required for Rgshhs")
+	    	# require("gpclib")
         }
 	polys <- .Call("Rgshhs", as.character(fn), as.integer(5), 
 		as.logical(dolim), as.numeric(lim), as.integer(level), 
@@ -68,7 +72,7 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
                         tp <- SpatialPolygons(list(Polygons(list(Polygon(
                             polys[[i]])), ID="1")))
                         rp0 <- NULL
-                        gI <- gIntersection(tp, limgp)
+                        gI <- rgeos::gIntersection(tp, limgp)
 # bug reported 120809 r-sig-geo.20.trevva
                         if (!is.null(gI) && is(gI, "SpatialCollections")) 
                             gI <- slot(gI, "polyobj")
@@ -235,7 +239,7 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
 				if (length(polys[[ii]]) > 1L) {
 				    for (j in 2:length(polys[[ii]])) {
 					lpj <- as(polys[[ii]][[j]], "gpc.poly")
-					lp1 <- append.poly(lp1, lpj)
+					lp1 <- gpclib::append.poly(lp1, lpj)
 				    }
 				}
 				l_1[[i]] <- lp1
@@ -246,7 +250,7 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
 				if (length(polys[[ii]]) > 1L) {
 				    for (j in 2:length(polys[[ii]])) {
 					lpj <- as(polys[[ii]][[j]], "gpc.poly")
-					lp1 <- append.poly(lp1, lpj)
+					lp1 <- gpclib::append.poly(lp1, lpj)
 				    }
 				}
 				for (j in 1:length(l_1)) {
diff --git a/R/SP2owin.R b/R/SP2owin.R
index 749435d..9934911 100644
--- a/R/SP2owin.R
+++ b/R/SP2owin.R
@@ -1,5 +1,7 @@
 .SP2owin <- function(SP) {
-    require(spatstat)
+    # require(spatstat)
+    if (!requireNamespace("spatstat", quietly = TRUE))
+	stop("package spatstat required for .SP2owin")
     pls <- slot(SP, "polygons")
     nParts <- sapply(pls, function(x) length(slot(x, "Polygons")))
     nOwin <- sum(nParts)
@@ -10,7 +12,7 @@
 	rD <- pl[[1]]@ringDir
 	if (rD == 1) crds <- crds[nrow(crds):1,]
 	crds <- crds[-nrow(crds),]
-	res <- owin(poly=list(x=crds[,1], y=crds[,2]))
+	res <- spatstat::owin(poly=list(x=crds[,1], y=crds[,2]))
     } else if (nOwin > 1) {
         opls <- vector(mode="list", length=nOwin)
         io <- 1
@@ -32,13 +34,11 @@
             }
         }
 #	if (exists(".spatstat_check") && !.spatstat_check) 
-        if (!spatstat.options("checkpolygons")) 
-        	res <- owin(bbox(SP)[1,], bbox(SP)[2,], poly = opls,
+        if (!spatstat::spatstat.options("checkpolygons")) 
+        	res <- spatstat::owin(bbox(SP)[1,], bbox(SP)[2,], poly = opls,
 			check=FALSE)
 # 070718 added check avoidance
-	else res <- owin(poly=opls)
+	else res <- spatstat::owin(poly=opls)
     } else stop("no valid polygons")
     res
 }
-
-
diff --git a/R/checkHoles.R b/R/checkHoles.R
index 3953fa7..208c9d6 100644
--- a/R/checkHoles.R
+++ b/R/checkHoles.R
@@ -25,22 +25,26 @@ rgeosStatus <- function() get("rgeos", envir=.MAPTOOLS_CACHE)
 checkPolygonsHoles <- function(x, properly=TRUE, avoidGEOS=FALSE,
     useSTRtree=FALSE) {
     if (rgeosStatus() && !avoidGEOS) {
-        require(rgeos)
+        # require(rgeos) # xxx
+    	if (!requireNamespace("rgeos", quietly = TRUE))
+		stop("package rgeos required")
 # version check rgeos
         if (compareVersion(as.character(packageVersion("rgeos")), "0.1-4") < 0)
             useSTRtree <- FALSE
         return(checkPolygonsGEOS(x, properly=properly, useSTRtree=useSTRtree))
     } else {
         stopifnot(isTRUE(gpclibPermitStatus()))
-	require(gpclib)
+	# require(gpclib)
+    	if (!requireNamespace("gpclib", quietly = TRUE))
+		stop("package gpclib required")
 	if (!is(x, "Polygons")) stop("not an Polygons object")
 	pls <- slot(x, "Polygons")
 	nParts <- length(pls)
 	ID <- slot(x, "ID")
 	gpc <- as(slot(pls[[1]], "coords"), "gpc.poly")
-	if (nParts > 1) for (i in 2:nParts) gpc <- append.poly(gpc, 
+	if (nParts > 1) for (i in 2:nParts) gpc <- gpclib::append.poly(gpc, 
 		as(slot(pls[[i]], "coords"), "gpc.poly"))
-	bb <- get.bbox(gpc)
+	bb <- gpclib::get.bbox(gpc)
 	bbmat <- matrix(c(rep(bb$x[1], 2), rep(bb$x[2], 2), bb$x[1], bb$y[1], 
 		rep(bb$y[2], 2), rep(bb$y[1], 2)), ncol=2)
 	gpc_bb <- as(bbmat, "gpc.poly")
@@ -105,7 +109,9 @@ checkPolygonsHoles <- function(x, properly=TRUE, avoidGEOS=FALSE,
 checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE) {
     if (!is(obj, "Polygons")) 
         stop("not a Polygons object")
-    comm <- try(createPolygonsComment(obj), silent=TRUE)
+    if (!requireNamespace("rgeos", quietly = TRUE))
+		stop("package rgeos required for checkPolygonsGEOS")
+    comm <- try(rgeos::createPolygonsComment(obj), silent=TRUE)
 #    isVal <- try(gIsValid(SpatialPolygons(list(obj))), silent=TRUE)
 #    if (class(isVal) == "try-error") isVal <- FALSE
     if (class(comm) != "try-error" && !force) {
@@ -113,20 +119,21 @@ checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE)
         return(obj)
     }
     pls <- slot(obj, "Polygons")
+    IDs <- slot(obj, "ID")
     n <- length(pls)
     if (n < 1) stop("Polygon list of zero length")
     uniqs <- rep(TRUE, n)
     if (n > 1) {
-      if (useSTRtree) tree1 <- gUnarySTRtreeQuery(obj)
+      if (useSTRtree) tree1 <- rgeos::gUnarySTRtreeQuery(obj)
       SP <- SpatialPolygons(lapply(1:n, function(i) 
         Polygons(list(pls[[i]]), ID=i)))
       for (i in 1:(n-1)) {
         if (useSTRtree) {
             if (!is.null(tree1[[i]])) {
-                res <- try(gEquals(SP[i,], SP[tree1[[i]],], byid=TRUE),
+                res <- try(rgeos::gEquals(SP[i,], SP[tree1[[i]],], byid=TRUE),
                     silent=TRUE)
                 if (class(res) == "try-error") {
-                    warning("Polygons object ", slot(obj, "ID"), ", Polygon ",
+                    warning("Polygons object ", IDs, ", Polygon ",
                         i, ": ", res)
                     next
                 }
@@ -135,9 +142,9 @@ checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE)
                 }
             }
         } else {
-            res <- try(gEquals(SP[i,], SP[uniqs,], byid=TRUE), silent=TRUE)
+            res <- try(rgeos::gEquals(SP[i,], SP[uniqs,], byid=TRUE), silent=TRUE)
             if (class(res) == "try-error") {
-                warning("Polygons object ", slot(obj, "ID"), ", Polygon ",
+                warning("Polygons object ", IDs, ", Polygon ",
                     i, ": ", res)
                 next
             }
@@ -152,11 +159,12 @@ checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE)
     if (any(!uniqs)) warning(paste("Duplicate Polygon objects dropped:",
         paste(wres, collapse=" ")))
     pls <- pls[uniqs]
+#    IDs <- IDs[uniqs]
     n <- length(pls)
     if (n < 1) stop("Polygon list of zero length")
     if (n == 1) {
-        oobj <- Polygons(pls, ID=slot(obj, "ID"))
-        comment(oobj) <- createPolygonsComment(oobj)
+        oobj <- Polygons(pls, ID=IDs)
+        comment(oobj) <- rgeos::createPolygonsComment(oobj)
         return(oobj)
     }
     areas <- sapply(pls, slot, "area")
@@ -165,20 +173,20 @@ checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE)
     holes <- rep(FALSE, n)
     SP <- SpatialPolygons(lapply(1:n, function(i) 
         Polygons(list(pls[[i]]), ID=i)))
-    if (useSTRtree) tree2 <- gUnarySTRtreeQuery(SP)
+    if (useSTRtree) tree2 <- rgeos::gUnarySTRtreeQuery(SP)
     for (i in 1:(n-1)) {
         if (useSTRtree) {
             if (!is.null(tree2[[i]])) {
-                if (properly) res <- gContainsProperly(SP[i,], SP[tree2[[i]],],
+                if (properly) res <- rgeos::gContainsProperly(SP[i,], SP[tree2[[i]],],
                     byid=TRUE)
-                else res <- gContains(SP[i,], SP[tree2[[i]],], byid=TRUE)
+                else res <- rgeos::gContains(SP[i,], SP[tree2[[i]],], byid=TRUE)
             } else {
                 res <- FALSE
             }
         } else {
-            if (properly) res <- gContainsProperly(SP[i,], SP[-(1:i),],
+            if (properly) res <- rgeos::gContainsProperly(SP[i,], SP[-(1:i),],
                 byid=TRUE)
-            else res <- gContains(SP[i,], SP[-(1:i),], byid=TRUE)
+            else res <- rgeos::gContains(SP[i,], SP[-(1:i),], byid=TRUE)
         }
         wres <- which(res)
         if (length(wres) > 0L) {
@@ -190,7 +198,7 @@ checkPolygonsGEOS <- function(obj, properly=TRUE, force=TRUE, useSTRtree=FALSE)
         if (oholes[i] != holes[i])
         pls[[i]] <- Polygon(slot(pls[[i]], "coords"), hole=holes[i])
     }
-    oobj <- Polygons(pls, ID=slot(obj, "ID"))
-    comment(oobj) <- createPolygonsComment(oobj)
+    oobj <- Polygons(pls, ID=IDs)
+    comment(oobj) <- rgeos::createPolygonsComment(oobj)
     oobj    
 }
diff --git a/R/colslegs.R b/R/colslegs.R
index e96d059..2ee7370 100644
--- a/R/colslegs.R
+++ b/R/colslegs.R
@@ -1,5 +1,6 @@
 # Copyright 2000-2001 (c) Nicholas Lewin-Koh 
 # modifications 2001-2003 (c) Roger Bivand
+# modifications 201506 Nick Bearman
 
 
 # Returns a vector of HSV values
@@ -40,17 +41,43 @@ color.ramp <- function (nclass, color = "red", nvec = NULL, type = "q"){
   return(NULL)
 }
 
-leglabs <- function(vec, under="under", over="over", between="-") {
-	x <- vec
-	lx <- length(x)
-	if(lx < 3) stop("vector too short")
-	res <- character(lx-1)
-	res[1] <- paste(under, x[2])
-	for (i in 2:(lx-2)) res[i] <- paste(x[i], between, x[i+1])
-	res[lx-1] <- paste(over, x[lx-1])
-	res
+#updated leglabs function to allow order of entries to be reversed
+
+leglabs <- function(vec, under="under", over="over", between="-", reverse = FALSE) {
+  x <- vec
+  lx <- length(x)
+  if(lx < 3) stop("vector too short")
+  if(reverse) { #if user asks order to be reversed
+    #reorder variable
+#    x<-reverseorder(x)
+    x<-rev(x)
+    #set new under and over values
+    under <- "over"
+    over <- "under"
+  }  
+  res <- character(lx-1)
+  res[1] <- paste(under, x[2])
+  for (i in 2:(lx-2)) res[i] <- paste(x[i], between, x[i+1])
+  res[lx-1] <- paste(over, x[lx-1])
+  res
 }
 
+#reverseorder <- function(old.var){
+  #function to reverseorder any set of values, designed for use with legends in maptools library
+  #copy variable to be reordered
+#  new.var <- old.var
+  #loop going through each value in turn
+#  for (i in 1:length(old.var)) {
+    #save it in the appropiate place in the new variable
+#    new.var[length(old.var)+1-i] <- old.var[i]
+#  } 
+  #return new variable
+#  return(new.var)
+#}
+
+#x 
+
+#x
 #The set of classification methods is large (Dent p. 145), but there are a few to remember:
 
 #        * Equal Intervals ("Constant Interval"): each class has same difference in value
diff --git a/R/getKMLcoordinates.R b/R/getKMLcoordinates.R
index 1f0f4d2..6f869cf 100644
--- a/R/getKMLcoordinates.R
+++ b/R/getKMLcoordinates.R
@@ -14,7 +14,8 @@ getKMLcoordinates <- function(kmlfile, ignoreAltitude = FALSE) {
     coords <- list()
     for (i in 1:(length(mtchs))) {
         kmlCoords <- unlist(strsplit(gsub(re, "\\1", substr(kml, 
-            mtchs[i], (mtchs[i] + attr(mtchs, "match.length")[i])), 
+# Kent Johnson bugfix (added -1) 151013
+            mtchs[i], (mtchs[i] + (attr(mtchs, "match.length")[i]-1))), 
             perl = TRUE), split = " "))
         m <- t(as.matrix(sapply(kmlCoords, function(x) as.numeric(unlist(
             strsplit(x, ","))), USE.NAMES = FALSE)))
diff --git a/R/kmlPoints.R b/R/kmlPoints.R
index 4a8ab49..8360cdb 100644
--- a/R/kmlPoints.R
+++ b/R/kmlPoints.R
@@ -1,7 +1,7 @@
 
 kmlPoints <- function (obj = NULL, kmlfile = NULL, kmlname = "", kmldescription = "",
                        name = NULL, description = "", 
-                       icon = "http://google.com/mapfiles/kml/paddle/wht-diamond.png") {
+                       icon = "http://www.gstatic.com/mapspro/images/stock/962-wht-diamond-blank.png") {
     # Handle null object
     if (is.null(obj)) 
         return(list(header = c("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", 
diff --git a/R/nowrapRecenter.R b/R/nowrapRecenter.R
index c1f78d2..ccf8edd 100644
--- a/R/nowrapRecenter.R
+++ b/R/nowrapRecenter.R
@@ -1,10 +1,17 @@
-nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2), 2), avoidGEOS=FALSE) {
+nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2.5), 2), avoidGEOS=FALSE) {
     rgeosI <- rgeosStatus()
     if (rgeosI) {
-        require(rgeos)
-    } else {
-        stopifnot(isTRUE(gpclibPermitStatus()))
-	require(gpclib)
+    	if (!requireNamespace("rgeos", quietly = TRUE))
+		stop("package rgeos required")
+#        require(rgeos)
+    } else if (!avoidGEOS) {
+    	if (!requireNamespace("polyclip", quietly = TRUE)) {
+          warning("package polyclip suggested")
+          stopifnot(isTRUE(gpclibPermitStatus()))
+    	  if (!requireNamespace("gpclib", quietly = TRUE))
+		stop("package gpclib required")
+        }
+#	require(gpclib)
     }
 	if (!is(obj, "SpatialPolygons")) stop("obj not a SpatialPolygons object")
 	proj <- is.projected(obj)
@@ -16,21 +23,25 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
 		pls <- slot(obj, "polygons")
 		Srl <- lapply(pls, .nowrapPolygons, offset=offset, eps=eps,
                     rgeosI=rgeosI, avoidGEOS=avoidGEOS)
+                Srl <- Srl[!sapply(Srl, is.null)]
 		res <- as.SpatialPolygons.PolygonsList(Srl,
 			proj4string=CRS(proj4string(obj)))
 	} else res <- obj
 	res
 }
 
-.nowrapPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps, 2),
-     rgeosI, avoidGEOS=FALSE) {
+.nowrapPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2.5), 2), rgeosI, avoidGEOS=FALSE) {
 	if (!is(obj, "Polygons")) stop("not an Polygons object")
+        if (slot(obj, "area")  < mean(eps)) return(NULL)
+        if (length(eps) == 1) eps <- rep(eps, 2)
 	bbo <- bbox(obj)
 	inout <- bbo[1,1] < offset && bbo[1,2] >= offset
 	if (inout) {
             if (rgeosI && !avoidGEOS) {
-                 comm <- try(createPolygonsComment(obj), silent=TRUE)
-                 isV <- try(gIsValid(SpatialPolygons(list(obj))), silent=TRUE)
+    		if (!requireNamespace("rgeos", quietly = TRUE))
+			stop("package rgeos required for .nowrapPolygons")
+                comm <- try(rgeos::createPolygonsComment(obj), silent=TRUE)
+                isV <- try(rgeos::gIsValid(SpatialPolygons(list(obj))), silent=TRUE)
                  if (class(comm) != "try-error" && class(isV) != "try-error" 
                      && isV) {
                      comment(obj) <- comm
@@ -46,21 +57,23 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
                      offset+eps[2], bb$y[1], rep(bb$y[2], 2), 
                      rep(bb$y[1], 2)), ncol=2)
                  SPobj <- SpatialPolygons(list(obj))
-                 resW <- gIntersection(SPobj, SpatialPolygons(list(Polygons(
+                 resW <- rgeos::gIntersection(SPobj, SpatialPolygons(list(Polygons(
                      list(Polygon(bbmatW)), ID="W"))))
-                 resE <- gIntersection(SPobj, SpatialPolygons(list(Polygons(
+                 resE <- rgeos::gIntersection(SPobj, SpatialPolygons(list(Polygons(
                      list(Polygon(bbmatE)), ID="E"))))
                  cparts <- c(slot(slot(resW, "polygons")[[1]], "Polygons"),
                      slot(slot(resE, "polygons")[[1]], "Polygons"))
                  res <- Polygons(cparts, ID=slot(obj, "ID"))
-            } else {
+            } else if (isTRUE(gpclibPermitStatus())) {
+    		if (!requireNamespace("gpclib", quietly = TRUE))
+			stop("package gpclib required for .nowrapPolygons")
 		pls <- slot(obj, "Polygons")
 		nParts <- length(pls)
 		ID <- slot(obj, "ID")
 		gpc <- as(slot(pls[[1]], "coords"), "gpc.poly")
-		if (nParts > 1) for (i in 2:nParts) gpc <- append.poly(gpc, 
+		if (nParts > 1) for (i in 2:nParts) gpc <- gpclib::append.poly(gpc, 
 			as(slot(pls[[i]], "coords"), "gpc.poly"))
-		bb <- get.bbox(gpc)
+		bb <- gpclib::get.bbox(gpc)
 		bbmat1 <- matrix(c(rep(bb$x[1], 2), rep(offset-eps[1], 2), 
 			bb$x[1], bb$y[1], rep(bb$y[2], 2), rep(bb$y[1], 2)), 
 			ncol=2)
@@ -69,7 +82,7 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
 			rep(bb$y[1], 2)), ncol=2)
 		gpc_left <- gpclib::intersect(gpc, as(bbmat1, "gpc.poly"))
 		gpc_right <- gpclib::intersect(gpc, as(bbmat2, "gpc.poly"))
-		gpc_res <- append.poly(gpc_left, gpc_right)
+		gpc_res <- gpclib::append.poly(gpc_left, gpc_right)
 		nP <- length(gpc_res at pts)
 		if (nP == 0)
 			return(obj)
@@ -77,6 +90,11 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
 		for (j in 1:nP) {
 			crds <- cbind(gpc_res at pts[[j]]$x, gpc_res at pts[[j]]$y)
 			crds <- rbind(crds, crds[1,])
+                        if (any(crds[,1] > offset)) {
+                            crds[,1] <- crds[,1] - (2*offset)
+                        } else if (any(crds[,1] < -offset)){
+                            crds[,1] <- crds[,1] + (2*offset)
+                        }
 			hole <- gpc_res at pts[[j]]$hole
 			rD <- .ringDirxy(crds)
 			if (rD == 1 & hole) crds <- crds[nrow(crds):1,]
@@ -84,12 +102,108 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
 			Srl[[j]] <- Polygon(coords=crds, hole=hole)
 		}
 		res <- Polygons(Srl, ID=ID)
+            } else {
+                if (!requireNamespace("polyclip", quietly = TRUE))
+			stop("package polyclip required for .nowrapPolygons")
+		pls <- slot(obj, "Polygons")
+		nParts <- length(pls)
+		ID <- slot(obj, "ID")
+                pc <- list(length=nParts)
+		crds <- slot(pls[[1]], "coords")
+                pc[[1]] <- list(x=crds[,1], y=crds[,2])
+		if (nParts > 1) for (i in 2:nParts) {
+                        crds <- slot(pls[[i]], "coords")
+                        pc[[i]] <- list(x=crds[,1], y=crds[,2])
+                }
+                bb <- apply(do.call("rbind", lapply(pc, function(i) sapply(i,
+                    range))), 2, range)
+		bbmat1 <- list(x=unname(c(rep(bb[1, "x"], 2),
+                    rep(offset-eps[1], 2), bb[1, "x"])),
+                    y=unname(c(bb[1, "y"], rep(bb[2, "y"], 2),
+                    rep(bb[1, "y"], 2))))
+		bbmat2 <- list(x=unname(c(rep(offset+eps[2], 2),
+                    rep(bb[2, "x"], 2), offset+eps[2])),
+                    y=unname(c(bb[1, "y"], rep(bb[2, "y"], 2), 
+                    rep(bb[1, "y"], 2))))
+		pc_left <- polyclip::polyclip(pc, bbmat1, op="intersection")
+		pc_right <- polyclip::polyclip(pc, bbmat2, op="intersection")
+		pc_res <- c(pc_left, pc_right)
+		nP <- length(pc_res)
+		if (nP == 0)
+			return(obj)
+		Srl <- vector(mode="list", length=nP)
+		for (j in 1:nP) {
+			crds <- cbind(pc_res[[j]]$x, pc_res[[j]]$y)
+			crds <- rbind(crds, crds[1,])
+                        if (any(crds[,1] > offset)) {
+                            crds[,1] <- crds[,1] - (2*offset)
+                        } else if (any(crds[,1] < -offset)){
+                            crds[,1] <- crds[,1] + (2*offset)
+                        }
+			Srl[[j]] <- Polygon(coords=crds)
+		}
+		res <- Polygons(Srl, ID=ID)
+
             }
 	} else res <- obj
 	res
 }
 
-nowrapRecenter <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2), 2), avoidGEOS=FALSE) {
-	res <- recenter(nowrapSpatialPolygons(obj, offset=offset, eps=eps, avoidGEOS=avoidGEOS))
+nowrapRecenter <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2.5),
+ 2), avoidGEOS=FALSE) {
+	res <- recenter(nowrapSpatialPolygons(obj, offset=offset, eps=eps,
+ avoidGEOS=avoidGEOS))
 	res
 }
+
+
+nowrapSpatialLines <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2.5), 2)) {
+    	if (!requireNamespace("rgeos", quietly = TRUE)) {
+	    stop("package rgeos required")
+        }
+
+	if (!is(obj, "SpatialLines")) stop("obj not a SpatialLines object")
+	proj <- is.projected(obj)
+	if (is.na(proj)) stop("unknown coordinate reference system")
+	if (proj) stop("cannot recenter projected coordinate reference system")
+	proj4CRS <- CRS(proj4string(obj))
+	bblong <- bbox(obj)[1,]
+	inout <- bblong[1] < offset && bblong[2] >= offset
+	if (inout) {
+		pls <- slot(obj, "lines")
+		Srl <- lapply(pls, .nowrapLines, offset=offset, eps=eps)
+		res <- SpatialLines(Srl, proj4CRS)
+	} else res <- obj
+	res
+}
+
+
+.nowrapLines <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/2.5), 2)) {
+	bbo <- range(sapply(obj at Lines, function(x) range(x at coords[,1])))
+	inout <- bbo[1] < offset && bbo[2] >= offset
+	if (inout) {
+                bb <- bbox(obj)
+                bb <- list(x=bb[1,], y=bb[2,])
+                bbmatW <- matrix(c(rep(bb$x[1], 2), rep(offset-eps[1], 2), 
+                    bb$x[1], bb$y[1], rep(bb$y[2], 2), rep(bb$y[1], 2)), 
+                    ncol=2)
+                bbmatE <- matrix(c(rep(offset+eps[2], 2), rep(bb$x[2], 2), 
+                    offset+eps[2], bb$y[1], rep(bb$y[2], 2), 
+                    rep(bb$y[1], 2)), ncol=2)
+                SPobj <- SpatialLines(list(obj))
+                resW <- rgeos::gIntersection(SPobj, SpatialPolygons(list(
+                    Polygons(list(Polygon(bbmatW)), ID="W"))))
+                resW <- ifelse (inherits(resW, "SpatialLines"),
+                    slot(slot(resW, "lines")[[1]], "Lines"), list(NULL))
+                resE <- rgeos::gIntersection(SPobj, SpatialPolygons(list(
+                    Polygons(list(Polygon(bbmatE)), ID="E"))))
+                resE <- ifelse (inherits(resE, "SpatialLines"),
+                    slot(slot(resE, "lines")[[1]], "Lines"), list(NULL))
+                cparts <- c(resW, resE)
+                cparts <- cparts[!sapply(cparts, is.null)]
+                res <- Lines(cparts, ID=slot(obj, "ID"))
+
+	} else res <- obj
+	res
+}
+
diff --git a/R/point_line_distance.R b/R/point_line_distance.R
index 9d67948..e8e8606 100644
--- a/R/point_line_distance.R
+++ b/R/point_line_distance.R
@@ -24,10 +24,10 @@ nearestPointOnLine = function(coordsLine, coordsPoint){
 snapPointsToLines <- function( points, lines, maxDist=NA, withAttrs=TRUE, idField=NA) {
 
     if (rgeosStatus()) {
-        require("rgeos") 
-    } else {
+    	if (!requireNamespace("rgeos", quietly = TRUE))
+			stop("package rgeos required for snapPointsToLines")
+    } else
         stop("rgeos not installed")
-    }
 
     if (class(points) == "SpatialPoints" && missing(withAttrs))
         withAttrs = FALSE
@@ -37,14 +37,14 @@ snapPointsToLines <- function( points, lines, maxDist=NA, withAttrs=TRUE, idFiel
 
 
     if (!is.na(maxDist)) {
-        w = gWithinDistance(points, lines, dist=maxDist, byid=TRUE)
+        w = rgeos::gWithinDistance(points, lines, dist=maxDist, byid=TRUE)
         validPoints = apply(w,2,any)
         validLines = apply(w,1,any)
         points = points[validPoints,]
         lines =  lines[validLines,]
     }
 
-    d = gDistance(points, lines, byid=TRUE) 
+    d = rgeos::gDistance(points, lines, byid=TRUE) 
     nearest_line_index = apply(d, 2, which.min) # Position of each nearest line in lines object 
 
     coordsLines = coordinates(lines)  
diff --git a/R/sp2pbs.R b/R/sp2pbs.R
index 69e3435..1de3e3d 100644
--- a/R/sp2pbs.R
+++ b/R/sp2pbs.R
@@ -1,7 +1,9 @@
 # PBSmapping utilities
 
 SpatialPolygons2PolySet <- function(SpP) {
-	require(PBSmapping)
+	# require(PBSmapping)
+    if (!requireNamespace("PBSmapping", quietly = TRUE))
+		stop("package PBSmapping required for SpatialPolygons2PolySet")
 	pls <- slot(SpP, "polygons")
 	n <- length(pls)
 	PID <- NULL
@@ -17,7 +19,10 @@ SpatialPolygons2PolySet <- function(SpP) {
 			k <- nrow(crds)
 			PID <- c(PID, rep(i, k))
 			SID <- c(SID, rep(j, k))
-			POS <- c(POS, 1:k)
+#			POS <- c(POS, 1:k)
+# Daniel Rodolphe Schlaepfer 140806
+			if(slot(srs[[j]], "hole")) POS <- c(POS, k:1) 
+			else POS <- c(POS, 1:k)
 			X <- c(X, crds[,1])
 			Y <- c(Y, crds[,2])
 		}
@@ -27,15 +32,14 @@ SpatialPolygons2PolySet <- function(SpP) {
 	POS <- as.integer(POS)
         storage.mode(X) <- "double"
         storage.mode(Y) <- "double"
-	require(PBSmapping)
 	pj <- .pbsproj(SpP)
 	zn <- NULL
 	if (pj == "UTM") {
 		zn <- attr(pj, "zone")
 		attr(pj, "zone") <- NULL
 	}
-	res <- as.PolySet(data.frame(PID=PID, SID=SID, POS=POS, X=X, Y=Y),
-		projection=pj, zone=zn)
+	res <- PBSmapping::as.PolySet(data.frame(PID=PID, SID=SID, POS=POS, 
+		X=X, Y=Y), projection=pj, zone=zn)
 	res
 }
 
@@ -66,15 +70,17 @@ SpatialLines2PolySet <- function(SL) {
 	POS <- as.integer(POS)
         storage.mode(X) <- "double"
         storage.mode(Y) <- "double"
-	require(PBSmapping)
+	# require(PBSmapping)
+    if (!requireNamespace("PBSmapping", quietly = TRUE))
+		stop("package PBSmapping required for SpatialPolygons2PolySet")
 	pj <- .pbsproj(SL)
 	zn <- NULL
 	if (pj == "UTM") {
 		zn <- attr(pj, "zone")
 		attr(pj, "zone") <- NULL
 	}
-	res <- as.PolySet(data.frame(PID=PID, SID=SID, POS=POS, X=X, Y=Y),
-		projection=pj, zone=zn)
+	res <- PBSmapping::as.PolySet(data.frame(PID=PID, SID=SID, POS=POS, 
+		X=X, Y=Y), projection=pj, zone=zn)
 	res
 }
 
@@ -99,13 +105,13 @@ PolySet2SpatialPolygons <- function(PS, close_polys=TRUE) {
     if (!inherits(PS, "PolySet")) stop("not a PolySet object")
     prj <- attr(PS, "projection")
     if (is.null(prj)) stop("unknown coordinate reference system")
-    if (prj == "LL") p4s <- "+proj=longlat"
+    if (prj == "LL") p4s <- "+proj=longlat +ellps=WGS84"
     else if (prj == "UTM") {
 # apparent change in PBS object attributes
         zn <- attr(prj, "zone")
         if (is.null(zn)) zn <- attr(PS, "zone")
         if (is.null(zn)) stop("no valid zone attribute")
-	p4s <- paste("+proj=utm +zone=", zn, sep="")
+	p4s <- paste("+proj=utm +ellps=WGS84 +zone=", zn, sep="")
     } else {
        p4s <- as.character(NA)
        warning("unknown coordinate reference system")
@@ -153,13 +159,13 @@ PolySet2SpatialLines <- function(PS) {
     prj <- attr(PS, "projection")
     prj <- attr(PS, "projection")
     if (is.null(prj)) stop("unknown coordinate reference system")
-    if (prj == "LL") p4s <- "+proj=longlat"
+    if (prj == "LL") p4s <- "+proj=longlat +ellps=WGS84"
     else if (prj == "UTM") {
 # apparent change in PBS object attributes
         zn <- attr(prj, "zone")
         if (is.null(zn)) zn <- attr(PS, "zone")
         if (is.null(zn)) stop("no valid zone attribute")
-	p4s <- paste("+proj=utm +zone=", zn, sep="")
+	p4s <- paste("+proj=utm +ellps=WGS84 +zone=", zn, sep="")
     } else {
        p4s <- as.character(NA)
        warning("unknown coordinate reference system")
@@ -184,8 +190,4 @@ PolySet2SpatialLines <- function(PS) {
     }
     outSP <- SpatialLines(outLines, proj4string=CRS(p4s))
     outSP
-    
-
 }
-
-
diff --git a/R/sp_spat1.R b/R/sp_spat1.R
index 278df6a..e9447e3 100644
--- a/R/sp_spat1.R
+++ b/R/sp_spat1.R
@@ -14,6 +14,9 @@ if (!isClass("im"))
 if (!isClass("tess"))
     setClass("tess")
 
+#if (!isClass("RasterLayer"))
+#    setClass("RasterLayer")
+
 as.SpatialPoints.ppp =  function(from) {
     mult <- 1
     if (!is.null(from$window$units) && !is.null(from$window$units$multiplier))
@@ -39,7 +42,9 @@ as.SpatialPointsDataFrame.ppp = function(from) {
 setAs("ppp", "SpatialPointsDataFrame", as.SpatialPointsDataFrame.ppp)
 
 as.SpatialGridDataFrame.ppp = function(from) {
-	require(spatstat)
+	# require(spatstat)
+    #if (!requireNamespace("spatstat", quietly = TRUE))
+	#	stop("package spatstat required for .SP2owin")
 	w = from$window
 	if (w$type != "mask")
 		stop("window is not of type mask")
@@ -55,7 +60,7 @@ as.SpatialGridDataFrame.ppp = function(from) {
 setAs("ppp", "SpatialGridDataFrame", as.SpatialGridDataFrame.ppp)
 
 as.SpatialGridDataFrame.im = function(from) {
-    require(spatstat)
+    # require(spatstat)
     offset = c(from$xrange[1] + 0.5 * from$xstep, from$yrange[1] + 
         0.5 * from$ystep)
     cellsize = c(diff(from$xrange)/from$dim[2], diff(from$yrange)/from$dim[1])
@@ -68,8 +73,35 @@ as.SpatialGridDataFrame.im = function(from) {
 setAs("im", "SpatialGridDataFrame", as.SpatialGridDataFrame.im)
 
 as.im.SpatialGridDataFrame = function(from) {
-    require(spatstat)
+    #require(spatstat)
+    if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.im.SpatialGridDataFrame")
     xi <- as.image.SpatialGridDataFrame(from)
-    im(t(xi$z), xcol=xi$x, yrow=xi$y)
+    spatstat::im(t(xi$z), xcol=xi$x, yrow=xi$y)
 }
 setAs("SpatialGridDataFrame", "im", as.im.SpatialGridDataFrame)
+
+as.im.RasterLayer <- function(from) 
+{
+    if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for coercion")
+    if (!requireNamespace("raster", quietly = TRUE))
+		stop("package raster required for coercion")
+    if (!raster::hasValues(from)) stop("values required in RasterLayer object")
+    if (raster::rotated(from)) {
+        stop("\n Cannot coerce because the object is rotated.\n Either coerce to SpatialPoints* from\n or first use the \"rectify\" function")
+    }
+    rs <- raster::res(from)
+    orig <- bbox(from)[, 1] + 0.5 * rs
+    dm <- dim(from)[2:1]
+    xx <- unname(orig[1] + cumsum(c(0, rep(rs[1], dm[1]-1))))
+    yy <- unname(orig[2] + cumsum(c(0, rep(rs[2], dm[2]-1))))
+    im <- spatstat::im(matrix(raster::values(from), ncol=dm[1], nrow=dm[2],
+        byrow=TRUE)[dm[2]:1,], xcol=xx, yrow=yy)
+    im
+}
+
+#if (requireNamespace("spatstat", quietly = TRUE) && requireNamespace("raster", quietly = TRUE)) {
+#  setAs("RasterLayer", "im", as.im.RasterLayer)
+#}
+
diff --git a/R/spatstat1.R b/R/spatstat1.R
index 89ba086..9eedeb7 100644
--- a/R/spatstat1.R
+++ b/R/spatstat1.R
@@ -1,52 +1,60 @@
 # as.ppp method to be used in spatstat:
 
 as.ppp.SpatialPoints = function(X) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.ppp.SpatialPoints")
         bb <- bbox(X)
         colnames(bb) <- NULL
-	W = owin(bb[1,], bb[2,])
+	W = spatstat::owin(bb[1,], bb[2,])
 	cc = coordinates(X)
-	return(ppp(cc[,1], cc[,2], window = W, marks = NULL, check=FALSE))
+	spatstat::ppp(cc[,1], cc[,2], window = W, marks = NULL, check=FALSE)
 }
 
 setAs("SpatialPoints", "ppp", function(from) as.ppp.SpatialPoints(from))
 
 # Mike Sumner 20101011
 as.ppp.SpatialPointsDataFrame = function(X) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.ppp.SpatialPointsDataFrame")
 	bb <- bbox(X)
         colnames(bb) <- NULL
-	W  <- owin(bb[1,], bb[2,])
+	W  <- spatstat::owin(bb[1,], bb[2,])
 	nc <- ncol(X)
         marks <- if(nc == 0) NULL else slot(X, "data")
 #        if(nc > 1)
 #          warning(paste(nc-1, "columns of data frame discarded"))
 	cc <- coordinates(X)
-	return(ppp(cc[,1], cc[,2], window = W, marks = marks, check=FALSE))
+	spatstat::ppp(cc[,1], cc[,2], window = W, marks = marks, check=FALSE)
 }
 
 setAs("SpatialPointsDataFrame", "ppp", function(from) as.ppp.SpatialPointsDataFrame(from))
 
 as.owin.SpatialGridDataFrame = function(W, ..., fatal) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialGridDataFrame")
 	# W = from
 	m = t(!is.na(as(W, "matrix")))
-	owin(bbox(W)[1,], bbox(W)[2,], mask = m[nrow(m):1,])
+	spatstat::owin(bbox(W)[1,], bbox(W)[2,], mask = m[nrow(m):1,])
 }
 
 setAs("SpatialGridDataFrame", "owin", function(from) as.owin.SpatialGridDataFrame(from))
 
 as.owin.SpatialPixelsDataFrame = function(W, ..., fatal) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
 	# W = from
 	m = t(!is.na(as(W, "matrix")))
-	owin(bbox(W)[1,], bbox(W)[2,], mask = m[nrow(m):1,])
+	spatstat::owin(bbox(W)[1,], bbox(W)[2,], mask = m[nrow(m):1,])
 }
 
 setAs("SpatialPixelsDataFrame", "owin", function(from) as.owin.SpatialPixelsDataFrame(from))
 
 as.owin.SpatialPolygons = function(W, ..., fatal) {
-	require(spatstat)
+	# require(spatstat)
 	# W = from
 	if (!inherits(W, "SpatialPolygons")) 
 		stop("W must be a SpatialPolygons object")
@@ -59,15 +67,16 @@ setAs("SpatialPolygons", "owin", function(from) as.owin.SpatialPolygons(from))
 # methods for coercion to Spatial Polygons by Adrian Baddeley
 
 owin2Polygons <- function(x, id="1") {
-	require(spatstat)
-  stopifnot(is.owin(x))
-  x <- as.polygonal(x)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
+  stopifnot(spatstat::is.owin(x))
+  x <- spatstat::as.polygonal(x)
   closering <- function(df) { df[c(seq(nrow(df)), 1), ] }
   if (x$type == "polygonal") {
       pieces <- lapply(x$bdry,
                    function(p) {
                      Polygon(coords=closering(cbind(p$x,p$y)),
-                             hole=is.hole.xypolygon(p))  })
+                             hole=spatstat::is.hole.xypolygon(p))  })
   } else if (x$type == "rectangle") {
       rectCrds <- cbind(x$xrange[c(1,1,2,2,1)], x$yrange[c(1,2,2,1,1)])
       pieces <- list(Polygon(rectCrds, hole=FALSE))
@@ -77,9 +86,11 @@ owin2Polygons <- function(x, id="1") {
 }
 
 as.SpatialPolygons.tess <- function(x) {
-	require(spatstat)
-  stopifnot(is.tess(x))
-  y <- tiles(x)
+	#require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
+  stopifnot(spatstat::is.tess(x))
+  y <- spatstat::tiles(x)
   nam <- names(y)
   z <- list()
   for(i in seq(y)) {
@@ -97,8 +108,10 @@ setAs("tess", "SpatialPolygons", function(from) as.SpatialPolygons.tess(from))
 
 
 as.SpatialPolygons.owin <- function(x) {
-	require(spatstat)
-  stopifnot(is.owin(x))
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
+	#require(spatstat)
+  stopifnot(spatstat::is.owin(x))
   y <- owin2Polygons(x)
   z <- SpatialPolygons(list(y))
   return(z)
@@ -111,31 +124,35 @@ setAs("owin", "SpatialPolygons", function(from) as.SpatialPolygons.owin(from))
 # methods for 'as.psp' for sp classes by Adrian Baddeley
 
 as.psp.Line <- function(from, ..., window=NULL, marks=NULL, fatal) {
-	require(spatstat)
+	#require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
   xy <- slot(from, "coords")
   df <- as.data.frame(cbind(xy[-nrow(xy), , drop=FALSE], xy[-1, ,
 drop=FALSE]))
   if(is.null(window)) {
     xrange <- range(xy[,1])
     yrange <- range(xy[,2])
-    window <- owin(xrange, yrange)
+    window <- spatstat::owin(xrange, yrange)
   }
-  return(as.psp(df, window=window, marks=marks))
+  return(spatstat::as.psp(df, window=window, marks=marks))
 }
 
 setAs("Line", "psp", function(from) as.psp.Line(from))
   
 as.psp.Lines <- function(from, ..., window=NULL, marks=NULL, fatal) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
   y <- lapply(slot(from, "Lines"), as.psp.Line, window=window)
   if (as.character(packageVersion("spatstat")) < "1.22.0") {
-    z <- superimposePSP(y, window=window)
+    z <- spatstat::superimposePSP(y, window=window)
   } else {
-    z <- do.call(superimpose,c(y,list(W=window)))
+    z <- do.call(spatstat::superimpose,c(y,list(W=window)))
 #    z <- superimpose(y, window=window)
   }
   if(!is.null(marks))
-    marks(z) <- marks
+    spatstat::marks(z) <- marks
   return(z)
 }
 
@@ -143,37 +160,41 @@ setAs("Lines", "psp", function(from) as.psp.Lines(from))
 
 as.psp.SpatialLines <- function(from, ..., window=NULL, marks=NULL,
                                  characterMarks=FALSE, fatal) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
   if(is.null(window)) {
     w <- slot(from, "bbox")
-    window <- owin(w[1,], w[2,])
+    window <- spatstat::owin(w[1,], w[2,])
   }
   lin <- slot(from, "lines")
   y <- lapply(lin, as.psp.Lines, window=window)
   id <- row.names(from)
   if(is.null(marks))
     for (i in seq(y)) 
-      marks(y[[i]]) <- if(characterMarks) id[i] else factor(id[i])
+      spatstat::marks(y[[i]]) <- if(characterMarks) id[i] else factor(id[i])
 # modified 110401 Rolf Turner
 #    for(i in seq(y)) 
 #      marks(y[[i]]) <- id[i]
   if (as.character(packageVersion("spatstat")) < "1.22.0") {
-    z <- do.call("superimposePSP", list(y, window=window))
+    z <- do.call(spatstat::superimposePSP, list(y, window=window))
   } else {
 #    z <- do.call("superimpose", list(y, window=window))
-    z <- do.call("superimpose", c(y, list(W = window)))
+    z <- do.call(spatstat::superimpose, c(y, list(W = window)))
   }
   if(!is.null(marks))
-    marks(z) <- marks
+    spatstat::marks(z) <- marks
   return(z)
 }
 
 setAs("SpatialLines", "psp", function(from) as.psp.SpatialLines(from))
 
 as.psp.SpatialLinesDataFrame <- function(from, ..., window=NULL, marks=NULL, fatal) {
-	require(spatstat)
+	# require(spatstat)
+	if (!requireNamespace("spatstat", quietly = TRUE))
+		stop("package spatstat required for as.owin.SpatialPixelsDataFrame")
   y <- as(from, "SpatialLines")
-  z <- as.psp(y, window=window, marks=marks)
+  z <- spatstat::as.psp(y, window=window, marks=marks)
   if(is.null(marks)) {
     # extract marks from first column of data frame
     df <- from at data
@@ -185,7 +206,7 @@ as.psp.SpatialLinesDataFrame <- function(from, ..., window=NULL, marks=NULL, fat
     nseg.Line  <- function(x) { return(nrow(x at coords)-1) }
     nseg.Lines <- function(x) { return(sum(unlist(lapply(x at Lines, nseg.Line)))) }
     nrep <- unlist(lapply(y at lines, nseg.Lines))
-    marks(z) <- rep(marx, nrep)
+    spatstat::marks(z) <- rep(marx, nrep)
   }
   return(z)
 }
@@ -206,5 +227,3 @@ as.SpatialLines.psp <- function(from) {
 }
 
 setAs("psp", "SpatialLines", function(from) as.SpatialLines.psp(from))
-
-
diff --git a/R/spmaps.R b/R/spmaps.R
index fbf1ed9..b213ffa 100644
--- a/R/spmaps.R
+++ b/R/spmaps.R
@@ -35,7 +35,9 @@
 }
 
 map2SpatialLines <- function(map, IDs=NULL, proj4string=CRS(as.character(NA))) {
-	require(maps)
+    	if (!requireNamespace("maps", quietly = TRUE))
+		stop("package maps required")
+#	require(maps)
 	xyList <- .NAmat2xyList(cbind(map$x, map$y))
 	if (is.null(IDs)) IDs <- as.character(1:length(xyList))
 
@@ -47,16 +49,28 @@ map2SpatialLines <- function(map, IDs=NULL, proj4string=CRS(as.character(NA))) {
 	belongs <- lapply(1:n, function(x) which(x == reg))
 # assemble the list of Lines
 	Srl <- vector(mode="list", length=n)
+        drop_Lines <- logical(length=n)
 	for (i in 1:n) {
 		nParts <- length(belongs[[i]])
 		srl <- vector(mode="list", length=nParts)
+                lgs <- logical(length=nParts)
 		for (j in 1:nParts) {
 			crds <- xyList[[belongs[[i]][j]]]
+                        lgs[j] <- LineLength(crds) > 0
 			if (nrow(crds) > 1) srl[[j]] <- Line(coords=crds)
 			else srl[[j]] <- Line(coords=rbind(crds, crds))
 		}
-		Srl[[i]] <- Lines(srl, ID=IDss[i])
+                srl <- srl[lgs]
+                drop_Lines[i] <- length(srl) <= 0L
+                if (!drop_Lines[i]) {
+		    Srl[[i]] <- Lines(srl, ID=IDss[i])
+                } 
 	}
+        if (sum(drop_Lines) > 0) 
+            warning("map2SpatialLines: ", sum(drop_Lines),
+                " zero-length Lines object(s) omitted")
+        Srl <- Srl[!drop_Lines]
+        if (length(Srl) <= 0L) stop("map2SpatialLines: no Lines output")
 	res <- SpatialLines(Srl, proj4string=proj4string)
 	res
 }
@@ -81,8 +95,10 @@ pruneMap <- function(map, xlim=NULL, ylim=NULL) {
 
 # to be moved to glue with maps:
 
-map2SpatialPolygons <- function(map, IDs, proj4string=CRS(as.character(NA))) {
-	require(maps)
+map2SpatialPolygons <- function(map, IDs, proj4string=CRS(as.character(NA)), checkHoles=FALSE) {
+    	if (!requireNamespace("maps", quietly = TRUE))
+		stop("package maps required")
+#	require(maps)
 	if (missing(IDs)) stop("IDs required")
 	xyList <- .NAmat2xyList(cbind(map$x, map$y))
 	if (length(xyList) != length(IDs)) stop("map and IDs differ in length")
@@ -93,16 +109,32 @@ map2SpatialPolygons <- function(map, IDs, proj4string=CRS(as.character(NA))) {
 	belongs <- lapply(1:n, function(x) which(x == reg))
 # assemble the list of Srings
 	Srl <- vector(mode="list", length=n)
+        drop_Polygons <- logical(length=n)
 	for (i in 1:n) {
 		nParts <- length(belongs[[i]])
 		srl <- vector(mode="list", length=nParts)
+                ars <- logical(length=nParts)
 		for (j in 1:nParts) {
                         crds <- xyList[[belongs[[i]][j]]]
+                        if (nrow(crds) == 2) crds <- rbind(crds, crds[1,])
                         if (nrow(crds) == 3) crds <- rbind(crds, crds[1,])
-			srl[[j]] <- Polygon(coords=crds)
+                        if (.ringDirxy_gpc(crds) == -1)
+                            crds <- crds[nrow(crds):1,]
+			srl[[j]] <- Polygon(coords=crds, hole=FALSE)
+                        ars[j] <- slot(srl[[j]], "area") > 0
 		}
-		Srl[[i]] <- Polygons(srl, ID=IDss[i])
+                srl <- srl[ars]
+                drop_Polygons[i] <- length(srl) <= 0L
+                if (!drop_Polygons[i]) {
+		  Srl[[i]] <- Polygons(srl, ID=IDss[i])
+                  if (checkHoles) Srl[[i]] <- checkPolygonsHoles(Srl[[i]])
+                }                 
 	}
+        if (sum(drop_Polygons) > 0) 
+            warning("map2SpatialPolygons: ", sum(drop_Polygons),
+                " zero-area Polygons object(s) omitted")
+        Srl <- Srl[!drop_Polygons]
+        if (length(Srl) <= 0L) stop("map2SpatialPolygons: no Polygons output")
 	res <- as.SpatialPolygons.PolygonsList(Srl, proj4string=proj4string)
 	res
 }
diff --git a/R/union.R b/R/union.R
index f07a286..e49da83 100644
--- a/R/union.R
+++ b/R/union.R
@@ -6,14 +6,18 @@ unionSpatialPolygons <- function(SpP, IDs, threshold=NULL, avoidGEOS=FALSE, avoi
         stop("input lengths differ")
     rgeosI <- rgeosStatus()
     if (rgeosI && !avoidGEOS) {
-        require(rgeos)
-        if (avoidUnaryUnion || version_GEOS0() < "3.3.0")
-            res <- gUnionCascaded(spgeom=SpP, id=IDs)
+        # require(rgeos)
+    	if (!requireNamespace("rgeos", quietly = TRUE))
+			stop("package rgeos required for unionSpatialPolygons")
+        if (avoidUnaryUnion || rgeos::version_GEOS0() < "3.3.0")
+            res <- rgeos::gUnionCascaded(spgeom=SpP, id=IDs)
         else
-            res <- gUnaryUnion(spgeom=SpP, id=IDs)
+            res <- rgeos::gUnaryUnion(spgeom=SpP, id=IDs)
     } else {
         stopifnot(isTRUE(gpclibPermitStatus()))
-	require(gpclib)
+    if (!requireNamespace("gpclib", quietly = TRUE))
+		stop("package gpclib required for unionSpatialPolygons")
+	# require(gpclib)
 	pl <- slot(SpP, "polygons")
 	proj4CRS <- CRS(proj4string(SpP))
 	SrnParts <- sapply(pl, function(x) length(slot(x, "Polygons")))
@@ -49,7 +53,7 @@ unionSpatialPolygons <- function(SpP, IDs, threshold=NULL, avoidGEOS=FALSE, avoi
 				resi <- gpclib::union(resi, as(pli[[j]], "gpc.poly"))
 			if (!is.null(threshold)) {
 				areas <- sapply(resi at pts, function(x) {
-				    area.poly(as(cbind(x$x, x$y), "gpc.poly"))})
+				    gpclib::area.poly(as(cbind(x$x, x$y), "gpc.poly"))})
 				resi at pts <- resi at pts[areas > threshold]
 			}
 			nP <- length(resi at pts)
diff --git a/build/vignette.rds b/build/vignette.rds
index aa4357d..d64f01f 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/data/gpcholes.rda b/data/gpcholes.rda
deleted file mode 100644
index 47fbe3a..0000000
Binary files a/data/gpcholes.rda and /dev/null differ
diff --git a/data/state.vbm.rda b/data/state.vbm.rda
deleted file mode 100644
index 144994f..0000000
Binary files a/data/state.vbm.rda and /dev/null differ
diff --git a/inst/ChangeLog b/inst/ChangeLog
index f08d56a..c705e72 100644
--- a/inst/ChangeLog
+++ b/inst/ChangeLog
@@ -1,114 +1,240 @@
+2016-01-28 13:48  rsbivand
+
+	* DESCRIPTION, R/kmlPoints.R, man/kmlPoints.Rd, man/wrld_simpl.Rd,
+	  src/pip.c: remove S.h from src/pip.c
+
+2015-10-28 21:01  rsbivand
+
+	* data/wrld_simpl.rda: tidy
+
+2015-10-14 13:07  rsbivand
+
+	* DESCRIPTION, inst/README, inst/shapes/Testing.kml,
+	  inst/shapes/tessellate.kml, man/getKMLcoordinates.Rd: tidy
+
+2015-10-14 07:06  rsbivand
+
+	* inst/README: tidy
+
+2015-10-13 14:43  rsbivand
+
+	* man/as.ppp.Rd: tidy
+
+2015-10-13 12:36  rsbivand
+
+	* DESCRIPTION, R/getKMLcoordinates.R, inst/README,
+	  inst/shapes/tessellate.kml, man/getKMLcoordinates.Rd: fix
+	  getKMLcoordinates bug
+
+2015-10-13 12:31  rsbivand
+
+	* man/nowrapSpatialLines.Rd: tidy
+
+2015-09-28 22:20  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-09-28 22:19  rsbivand
+
+	* ChangeLog, DESCRIPTION, NAMESPACE, R/nowrapRecenter.R,
+	  R/sp_spat1.R, man/as.ppp.Rd, man/gzAzimuth.Rd: tidy
+
+2015-07-03 11:21  rsbivand
+
+	* R/nowrapRecenter.R, R/sp_spat1.R, R/spmaps.R: nowrapSL to rgeos
+
+2015-06-30 21:16  rsbivand
+
+	* DESCRIPTION, R/sp_spat1.R, man/as.ppp.Rd: RasterLayer to im
+	  coercion
+
+2015-06-30 05:52  rsbivand
+
+	* DESCRIPTION, NAMESPACE, R/nowrapRecenter.R, R/spmaps.R,
+	  man/map2SpatialPolygons.Rd, man/nowrapRecenter.Rd: nowrap
+	  revisions
+
+2015-06-28 15:17  rsbivand
+
+	* DESCRIPTION, NAMESPACE, R/nowrapRecenter.R: CRAN
+	  _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_=true NAMESPACE tidy
+
+2015-06-10 13:55  rsbivand
+
+	* DESCRIPTION, R/colslegs.R, man/leglabs.Rd, man/sp2Mondrian.Rd,
+	  vignettes/combine_maptools.Rnw: reverse leglabs
+
+2015-04-24 10:26  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-04-24 10:25  rsbivand
+
+	* DESCRIPTION, R/checkHoles.R: remove gc() and rm() from checkHoles
+
+2015-04-23 10:19  rsbivand
+
+	* ChangeLog, inst/ChangeLog, svn2cl.xsl: tidy
+
+2015-04-20 13:21  rsbivand
+
+	* DESCRIPTION, R/checkHoles.R, R/sp2pbs.R, man/GE_SpatialGrid.Rd,
+	  man/kmlLine.Rd, man/kmlLines.Rd, man/kmlOverlay.Rd,
+	  man/nowrapRecenter.Rd: cleaning oddities, mostly adding +ellps=
+
+2015-04-13 07:55  rsbivand
+
+	* R/checkHoles.R, data/wrld_simpl.rda: tidy
+
+2015-04-13 06:06  edzer
+
+	* DESCRIPTION, man/SpatialLines2PolySet.Rd: version bump; adapt
+	  CRS() to sp 1.1-0 requirements: wgs->WGS, +ellps=WGS84
+
+2015-02-03 13:57  rsbivand
+
+	* DESCRIPTION, R/spmaps.R, man/map2SpatialPolygons.Rd,
+	  src/Rgshhs.c, src/shapefil.h: make map to SP hole checking
+	  optional
+
+2015-02-01 16:34  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
+2015-02-01 16:33  rsbivand
+
+	* DESCRIPTION: tidy
+
+2015-01-31 13:36  rsbivand
+
+	* DESCRIPTION, R/nowrapRecenter.R, R/spmaps.R,
+	  man/GE_SpatialGrid.Rd, man/dotsInPolys.Rd, man/readGPS.Rd,
+	  man/readSplus.Rd, man/sp2WB.Rd, man/sp2tmap.Rd,
+	  man/symbolsInPolys.Rd: checking all examples
+
+2015-01-30 16:36  rsbivand
+
+	* man/SpatialLines2PolySet.Rd: tidy
+
+2015-01-30 16:35  rsbivand
+
+	* DESCRIPTION: tidy
+
+2015-01-27 18:55  edzer
+
+	* R/DP.R, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
+	  R/nowrapRecenter.R, R/point_line_distance.R, R/sp2pbs.R,
+	  R/sp_spat1.R, R/spatstat1.R, R/union.R: solved all "no visible
+	  global function definition for" warnings by removing all
+	  require("xxx") calls.
+
+2014-08-06 18:53  rsbivand
+
+	* DESCRIPTION, R/sp2pbs.R, src/Rgshhs.c: PBS hole
+
+2014-06-05 15:18  rsbivand
+
+	* DESCRIPTION, R/AAA.R, R/point_line_distance.R, man/Rgshhs.Rd,
+	  man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
+	  man/readSplus.Rd, man/snapPointsToLines.Rd,
+	  man/unionSpatialPolygons.Rd, vignettes/combine_maptools.Rnw:
+	  rgeos-proof examples and vignette
+
+2014-02-19 16:53  rsbivand
+
+	* ChangeLog, inst/ChangeLog: tidy
+
 2014-02-19 16:51  rsbivand
 
-	* DESCRIPTION,
-	  inst/share/gshhs_c.b, inst/share/wdb_borders_c.b, man/Rgshhs.Rd:
-	  upgraded GSHHS files to 2.3.0
+	* DESCRIPTION, inst/share/gshhs_c.b, inst/share/wdb_borders_c.b,
+	  man/Rgshhs.Rd: upgraded GSHHS files to 2.3.0
 
 2014-01-28 19:02  rsbivand
 
-	* DESCRIPTION,
-	  R/point_line_distance.R: fix is/class issue in
+	* DESCRIPTION, R/point_line_distance.R: fix is/class issue in
 	  point_line_distance
 
 2014-01-22 09:42  rsbivand
 
-	* DESCRIPTION,
-	  R/point_line_distance.R, man/snapPointsToLines.Rd: update
-	  to snapPointsToLines
+	* DESCRIPTION, R/point_line_distance.R, man/snapPointsToLines.Rd:
+	  update to snapPointsToLines
 
 2013-09-01 18:06  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-30 11:38  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-30 11:37  rsbivand
 
-	* .Rbuildignore,
-	  DESCRIPTION: tidy
+	* .Rbuildignore, DESCRIPTION: tidy
 
 2013-08-29 18:49  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
-	  R/maptools.R, R/nowrapRecenter.R, R/sp_spat1.R, R/union.R:
-	  remove :::
+	* DESCRIPTION, NAMESPACE, R/Rgshhs.R, R/SP2owin.R, R/checkHoles.R,
+	  R/maptools.R, R/nowrapRecenter.R, R/sp_spat1.R, R/union.R: remove
+	  :::
 
 2013-08-07 11:17  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-08-07 11:15  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, man/pointLabelLattice.Rd, man/spCbind-methods.Rd:
-	  depends -> imports
+	* DESCRIPTION, NAMESPACE, man/pointLabelLattice.Rd,
+	  man/spCbind-methods.Rd: depends -> imports
 
 2013-07-02 19:01  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-07-02 19:01  rsbivand
 
-	* inst/LICENSE,
-	  inst/README: tidy
+	* inst/LICENSE, inst/README: tidy
 
 2013-07-02 18:00  rsbivand
 
-	* DESCRIPTION:
-	  tidy
+	* DESCRIPTION: tidy
 
 2013-07-02 17:56  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-07-02 17:48  rsbivand
 
-	* DESCRIPTION:
-	  tidy
+	* DESCRIPTION: tidy
 
 2013-06-27 20:50  edzer
 
-	* R/sp_spat1.R:
-	  brought back tess.
+	* R/sp_spat1.R: brought back tess.
 
 2013-06-27 20:46  edzer
 
-	* R/sp_spat1.R:
-	  removed class tess, which is used nor exported
+	* R/sp_spat1.R: removed class tess, which is used nor exported
 
 2013-06-25 17:11  rsbivand
 
-	* vignettes/combine_maptools.Rnw,
-	  vignettes/combine_maptools.pdf: adding footnote
+	* vignettes/combine_maptools.Rnw, vignettes/combine_maptools.pdf:
+	  adding footnote
 
 2013-06-21 12:52  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-06-21 12:50  rsbivand
 
-	* DESCRIPTION,
-	  man/CCmaps.Rd, man/kmlPoints.Rd, man/kmlPolygons.Rd,
+	* DESCRIPTION, man/CCmaps.Rd, man/kmlPoints.Rd, man/kmlPolygons.Rd,
 	  man/sun-methods.Rd: length of lines
 
 2013-06-20 18:20  rsbivand
 
-	* DESCRIPTION:
-	  adding vignette, kml functions
+	* DESCRIPTION: adding vignette, kml functions
 
 2013-06-20 18:16  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/kmlLines.R, R/kmlPolygons.R,
+	* DESCRIPTION, NAMESPACE, R/kmlLines.R, R/kmlPolygons.R,
 	  inst/shapes/co37_d90.dbf, inst/shapes/co37_d90.shp,
 	  inst/shapes/co37_d90.shx, inst/shapes/co45_d90.dbf,
 	  inst/shapes/co45_d90.shp, inst/shapes/co45_d90.shx,
@@ -120,404 +246,341 @@
 
 2013-03-30 12:53  rsbivand
 
-	* LICENSE,
-	  src/Rcentroid.c, src/Rgshhs.c, src/Rshapewrite1.c,
+	* LICENSE, src/Rcentroid.c, src/Rgshhs.c, src/Rshapewrite1.c,
 	  src/insiders.c, src/shapefil.h, src/shpopen.c, src/shptree.c:
 	  remove clang warnings
 
 2013-03-22 07:34  rsbivand
 
-	* man/map2SpatialPolygons.Rd:
-	  wgs84 -> WGS84 in map2SP help page
+	* man/map2SpatialPolygons.Rd: wgs84 -> WGS84 in map2SP help page
 
 2013-03-07 09:47  rsbivand
 
-	* R/Spatial-methods.R,
-	  R/SpatialLines-methods.R, R/SpatialPoints-methods.R,
-	  R/SpatialPolys-methods.R: block non-Spatial objects
+	* R/Spatial-methods.R, R/SpatialLines-methods.R,
+	  R/SpatialPoints-methods.R, R/SpatialPolys-methods.R: block
+	  non-Spatial objects
 
 2013-02-10 14:00  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-02-10 13:58  rsbivand
 
-	* .Rbuildignore:
-	  don't ship old_man
+	* .Rbuildignore: don't ship old_man
 
 2013-02-09 10:22  rsbivand
 
-	* DESCRIPTION,
-	  src/Rgshhs.c, src/Rshapeget.c, src/Rshapewrite1.c: C code
-	  warning cleanup; new-style contribs
+	* DESCRIPTION, src/Rgshhs.c, src/Rshapeget.c, src/Rshapewrite1.c: C
+	  code warning cleanup; new-style contribs
 
 2013-01-16 09:24  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2013-01-16 09:22  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R: move startup message to .onAttach
+	* DESCRIPTION, R/AAA.R: move startup message to .onAttach
 
 2013-01-04 00:36  oscarperpi
 
-	* man/lineLabel.Rd:
-	  Fixed description in lineLabel.Rd
+	* man/lineLabel.Rd: Fixed description in lineLabel.Rd
 
 2012-12-21 12:36  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-19 13:29  edzer
 
-	* DESCRIPTION,
-	  R/dotsinpolys.R: version bump, added URL dotsinpolygons: renamed
-	  sample.Polygons to spsample, so we can retire sample.Xxx in sp
+	* DESCRIPTION, R/dotsinpolys.R: version bump, added URL
+	  dotsinpolygons: renamed sample.Polygons to spsample, so we can
+	  retire sample.Xxx in sp
 
 2012-11-19 13:00  oscarperpi
 
-	* NAMESPACE:
-	  new method "label" for line labels
+	* NAMESPACE: new method "label" for line labels
 
 2012-11-19 12:59  oscarperpi
 
-	* man/lineLabel.Rd:
-	  new line labels examples added
+	* man/lineLabel.Rd: new line labels examples added
 
 2012-11-19 12:59  oscarperpi
 
-	* R/lineLabel.R:
-	  line label algorithm improved
+	* R/lineLabel.R: line label algorithm improved
 
 2012-11-12 09:25  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-12 09:24  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, R/CCmaps.R: fix bug in CCmaps
+	* ChangeLog, DESCRIPTION, R/CCmaps.R: fix bug in CCmaps
 
 2012-11-06 07:17  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, man/lineLabel.Rd, man/pointLabelLattice.Rd: add
-	  drawDetails.labels to NAMESPACE
+	* DESCRIPTION, NAMESPACE, man/lineLabel.Rd,
+	  man/pointLabelLattice.Rd: add drawDetails.labels to NAMESPACE
 
 2012-11-05 08:11  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-11-05 08:11  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/lineLabel.R, R/pointLabel.R, R/pointLabelBase.R,
-	  R/pointLabelLattice.R, man/lineLabel.Rd, man/pointLabel.Rd,
-	  man/pointLabelBase.Rd, man/pointLabelLattice.Rd, man/sp2WB.Rd:
-	  to UTF-8; adding lattice pointLabel
+	* DESCRIPTION, NAMESPACE, R/lineLabel.R, R/pointLabel.R,
+	  R/pointLabelBase.R, R/pointLabelLattice.R, man/lineLabel.Rd,
+	  man/pointLabel.Rd, man/pointLabelBase.Rd,
+	  man/pointLabelLattice.Rd, man/sp2WB.Rd: to UTF-8; adding lattice
+	  pointLabel
 
 2012-11-04 16:04  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-10-29 14:39  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R: branching in owin2Polygons on as.polygonal type
+	* DESCRIPTION, R/spatstat1.R: branching in owin2Polygons on
+	  as.polygonal type
 
 2012-08-22 12:35  rsbivand
 
-	* man/SpatialLines2PolySet.Rd,
-	  man/map2SpatialPolygons.Rd, man/pal2SpatialPolygons.Rd: make
-	  suggests if(require())
+	* man/SpatialLines2PolySet.Rd, man/map2SpatialPolygons.Rd,
+	  man/pal2SpatialPolygons.Rd: make suggests if(require())
 
 2012-08-09 12:58  rsbivand
 
-	* DESCRIPTION,
-	  R/Rgshhs.R, man/Rgshhs.Rd: Rgshhs SpatialCollections avoidance
+	* DESCRIPTION, R/Rgshhs.R, man/Rgshhs.Rd: Rgshhs SpatialCollections
+	  avoidance
 
 2012-07-22 13:10  rsbivand
 
-	* R/midpoint.R:
-	  correct midpoint data.frame
+	* R/midpoint.R: correct midpoint data.frame
 
 2012-06-29 08:45  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-06-08 20:10  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2012-06-08 20:08  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/midpoint.R, man/SpatialLinesMidPoints.Rd: add
-	  line midpoint
+	* DESCRIPTION, NAMESPACE, R/midpoint.R,
+	  man/SpatialLinesMidPoints.Rd: add line midpoint
 
 2012-05-09 08:12  rsbivand
 
-	* R/getKMLcoordinates.R:
-	  blanks in KML input
+	* R/getKMLcoordinates.R: blanks in KML input
 
 2012-05-04 08:29  rsbivand
 
-	* R/elide.R:
-	  copy comment in elide
+	* R/elide.R: copy comment in elide
 
 2012-05-03 11:09  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/point_line_distance.R, man/nearestPointOnLine.Rd,
-	  man/nearestPointOnSegment.Rd, man/snapPointsToLines.Rd: adding
-	  functions for snapping points to lines by German Carrillo
+	* DESCRIPTION, NAMESPACE, R/point_line_distance.R,
+	  man/nearestPointOnLine.Rd, man/nearestPointOnSegment.Rd,
+	  man/snapPointsToLines.Rd: adding functions for snapping points to
+	  lines by German Carrillo
 
 2012-02-06 09:13  rsbivand
 
-	* DESCRIPTION,
-	  man/Rgshhs.Rd: Rgshhs documentation
+	* DESCRIPTION, man/Rgshhs.Rd: Rgshhs documentation
 
 2012-01-27 12:29  rsbivand
 
-	* man/unionSpatialPolygons.Rd:
-	  fix documentation
+	* man/unionSpatialPolygons.Rd: fix documentation
 
 2012-01-15 13:15  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, inst/ChangeLog: tidy
+	* ChangeLog, DESCRIPTION, inst/ChangeLog: tidy
 
 2012-01-12 06:50  rsbivand
 
-	* man/SplashDams.Rd:
-	  updated source for splash dam data
+	* man/SplashDams.Rd: updated source for splash dam data
 
 2012-01-09 19:08  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/kmlPoints.R, data/SplashDams.rda,
+	* DESCRIPTION, NAMESPACE, R/kmlPoints.R, data/SplashDams.rda,
 	  man/SplashDams.Rd, man/kmlPoints.Rd: adding kmlPoints
 
 2012-01-02 18:14  rsbivand
 
-	* DESCRIPTION,
-	  data/state.vbm.rda, man/state.vbm.Rd: adding state.vbm
+	* DESCRIPTION, data/state.vbm.rda, man/state.vbm.Rd: adding
+	  state.vbm
 
 2011-12-19 09:01  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: upgrade GSHHS to 2.2.0
+	* ChangeLog, inst/ChangeLog: upgrade GSHHS to 2.2.0
 
 2011-12-19 09:00  rsbivand
 
-	* DESCRIPTION,
-	  inst/share/gshhs_c.b, inst/share/wdb_borders_c.b, man/Rgshhs.Rd,
-	  src/Rgshhs.c, src/Rgshhs.h: upgrade GSHHS to 2.2.0
+	* DESCRIPTION, inst/share/gshhs_c.b, inst/share/wdb_borders_c.b,
+	  man/Rgshhs.Rd, src/Rgshhs.c, src/Rgshhs.h: upgrade GSHHS to 2.2.0
 
 2011-11-17 08:19  rsbivand
 
-	* DESCRIPTION,
-	  NAMESPACE, R/spatstat1.R, man/as.ppp.Rd: adding
+	* DESCRIPTION, NAMESPACE, R/spatstat1.R, man/as.ppp.Rd: adding
 	  as.SpatialLines.psp
 
 2011-11-14 21:35  rsbivand
 
-	* DESCRIPTION,
-	  R/checkHoles.R, R/pointLabel.R, R/sun.R, src/shpopen.c:
-	  complete partial argument matches
+	* DESCRIPTION, R/checkHoles.R, R/pointLabel.R, R/sun.R,
+	  src/shpopen.c: complete partial argument matches
 
 2011-08-08 18:52  rsbivand
 
-	* man/readShapeLines.Rd,
-	  man/readShapePoints.Rd, man/readShapePoly.Rd,
-	  man/readShapeSpatial.Rd: link to write.dbf
+	* man/readShapeLines.Rd, man/readShapePoints.Rd,
+	  man/readShapePoly.Rd, man/readShapeSpatial.Rd: link to write.dbf
 
 2011-08-07 11:49  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: editing startup message
+	* ChangeLog, inst/ChangeLog: editing startup message
 
 2011-08-07 11:48  rsbivand
 
-	* R/AAA.R:
-	  editing startup message
+	* R/AAA.R: editing startup message
 
 2011-08-07 11:33  rsbivand
 
-	* inst/ChangeLog:
-	  editing startup message
+	* inst/ChangeLog: editing startup message
 
 2011-08-07 11:32  rsbivand
 
-	* ChangeLog:
-	  editing startup message
+	* ChangeLog: editing startup message
 
 2011-08-07 11:28  rsbivand
 
-	* NAMESPACE,
-	  man/Rgshhs.Rd, man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
-	  man/unionSpatialPolygons.Rd: editing startup message
+	* NAMESPACE, man/Rgshhs.Rd, man/checkPolygonsHoles.Rd,
+	  man/nowrapRecenter.Rd, man/unionSpatialPolygons.Rd: editing
+	  startup message
 
 2011-08-06 14:18  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, R/checkHoles.R: edited startup message
+	* DESCRIPTION, R/AAA.R, R/checkHoles.R: edited startup message
 
 2011-06-11 05:38  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: permit NA IDs in union
+	* ChangeLog, inst/ChangeLog: permit NA IDs in union
 
 2011-06-11 05:37  rsbivand
 
-	* DESCRIPTION,
-	  R/union.R, man/unionSpatialPolygons.Rd: permit NA IDs in union
+	* DESCRIPTION, R/union.R, man/unionSpatialPolygons.Rd: permit NA
+	  IDs in union
 
 2011-06-10 08:03  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: documenting unionSpatialPolygons change
+	* ChangeLog, inst/ChangeLog: documenting unionSpatialPolygons
+	  change
 
 2011-06-10 08:02  rsbivand
 
-	* DESCRIPTION:
-	  documenting unionSpatialPolygons change
+	* DESCRIPTION: documenting unionSpatialPolygons change
 
 2011-06-10 08:00  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: documenting unionSpatialPolygons change
+	* ChangeLog, inst/ChangeLog: documenting unionSpatialPolygons
+	  change
 
 2011-06-10 07:58  rsbivand
 
-	* man/unionSpatialPolygons.Rd:
-	  documenting unionSpatialPolygons change
+	* man/unionSpatialPolygons.Rd: documenting unionSpatialPolygons
+	  change
 
 2011-06-09 08:10  rsbivand
 
-	* DESCRIPTION,
-	  R/union.R, man/unionSpatialPolygons.Rd: added gUnaryUnion
-	  to unionSpatialPolygons
+	* DESCRIPTION, R/union.R, man/unionSpatialPolygons.Rd: added
+	  gUnaryUnion to unionSpatialPolygons
 
 2011-05-06 06:14  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2011-05-06 06:13  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R, man/as.ppp.Rd: superimpose correction
+	* DESCRIPTION, R/spatstat1.R, man/as.ppp.Rd: superimpose correction
 
 2011-04-29 06:29  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: change superimpose
+	* ChangeLog, inst/ChangeLog: change superimpose
 
 2011-04-29 06:28  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R: change superimpose
+	* DESCRIPTION, R/spatstat1.R: change superimpose
 
 2011-04-03 20:26  sluque
 
-	* R/sun-methods.R:
-	  Fix comments for proper outlining with allout.
+	* R/sun-methods.R: Fix comments for proper outlining with allout.
 
 2011-04-01 06:57  rsbivand
 
-	* DESCRIPTION,
-	  R/spatstat1.R, man/as.ppp.Rd: marks fix for psp
+	* DESCRIPTION, R/spatstat1.R, man/as.ppp.Rd: marks fix for psp
 
 2011-03-30 14:48  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: more hole fixing
+	* ChangeLog, inst/ChangeLog: more hole fixing
 
 2011-03-30 14:48  rsbivand
 
-	* R/checkHoles.R,
-	  man/checkPolygonsHoles.Rd: more hole fixing
+	* R/checkHoles.R, man/checkPolygonsHoles.Rd: more hole fixing
 
 2011-03-29 12:45  rsbivand
 
-	* R/checkHoles.R:
-	  tree holes
+	* R/checkHoles.R: tree holes
 
 2011-03-29 08:24  rsbivand
 
-	* R/checkHoles.R:
-	  STRtree in hole check
+	* R/checkHoles.R: STRtree in hole check
 
 2011-03-28 13:14  rsbivand
 
-	* DESCRIPTION,
-	  R/checkHoles.R: try around gEquals in hole check
+	* DESCRIPTION, R/checkHoles.R: try around gEquals in hole check
 
 2011-03-28 08:25  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: add comments to wrld_simpl
+	* ChangeLog, inst/ChangeLog: add comments to wrld_simpl
 
 2011-03-28 08:24  rsbivand
 
-	* DESCRIPTION,
-	  data/wrld_simpl.rda: add comments to wrld_simpl
+	* DESCRIPTION, data/wrld_simpl.rda: add comments to wrld_simpl
 
 2011-03-23 13:50  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2011-03-23 13:50  rsbivand
 
-	* ChangeLog,
-	  DESCRIPTION, inst/ChangeLog: tidy
+	* ChangeLog, DESCRIPTION, inst/ChangeLog: tidy
 
 2011-03-22 22:25  rsbivand
 
-	* data/wrld_simpl.rda:
-	  resave rda files
+	* data/wrld_simpl.rda: resave rda files
 
 2011-03-22 22:23  rsbivand
 
-	* data/gpcholes.rda,
-	  data/wrld_simpl.rda: resave rda files
+	* data/gpcholes.rda, data/wrld_simpl.rda: resave rda files
 
 2011-03-22 22:22  rsbivand
 
-	* data/gpcholes.rda,
-	  data/wrld_simpl.rda: resave rda files
+	* data/gpcholes.rda, data/wrld_simpl.rda: resave rda files
 
 2011-03-21 10:12  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: fix 2.13 Rd bugs
+	* ChangeLog, inst/ChangeLog: fix 2.13 Rd bugs
 
 2011-03-21 10:06  rsbivand
 
-	* DESCRIPTION,
-	  man/getKMLcoordinates.Rd, man/kmlLine.Rd, man/kmlPolygon.Rd:
-	  fix 2.13 Rd bugs
+	* DESCRIPTION, man/getKMLcoordinates.Rd, man/kmlLine.Rd,
+	  man/kmlPolygon.Rd: fix 2.13 Rd bugs
 
 2011-03-10 13:56  rsbivand
 
-	* R/sp2pbs.R,
-	  R/spmaps.R: PolySet2SpatialPolygons projection modification
+	* R/sp2pbs.R, R/spmaps.R: PolySet2SpatialPolygons projection
+	  modification
 
 2011-02-24 14:29  rsbivand
 
-	* R/CCmaps.R,
-	  R/DP.R, R/Rgshhs.R, R/SpatialLines-methods.R,
+	* R/CCmaps.R, R/DP.R, R/Rgshhs.R, R/SpatialLines-methods.R,
 	  R/SpatialPolys-methods.R, R/asciigrid.R, R/checkHoles.R,
 	  R/elide.R, R/gc_dist.R, R/kmlLine.R, R/kmlPolygon.R,
 	  R/maptools.R, R/readSplus.R, R/shapelib.R, R/sp2pbs.R,
@@ -526,109 +589,93 @@
 
 2011-02-11 09:42  rsbivand
 
-	* R/Rgshhs.R:
-	  Rgshhs intersection
+	* R/Rgshhs.R: Rgshhs intersection
 
 2011-02-06 14:48  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, src/shapefil.h, src/shpopen.c, src/shptree.c: suppress
-	  startup messages
+	* DESCRIPTION, R/AAA.R, src/shapefil.h, src/shpopen.c,
+	  src/shptree.c: suppress startup messages
 
 2011-01-02 14:25  rsbivand
 
-	* R/Rgshhs.R,
-	  man/Rgshhs.Rd: GSHHS 2.1.0 update
+	* R/Rgshhs.R, man/Rgshhs.Rd: GSHHS 2.1.0 update
 
 2010-12-31 15:43  rsbivand
 
-	* inst/share/gshhs_c.b:
-	  GSHHS 2.1.0 update
+	* inst/share/gshhs_c.b: GSHHS 2.1.0 update
 
 2010-12-31 15:37  rsbivand
 
-	* R/checkHoles.R,
-	  man/Rgshhs.Rd, src/Rgshhs.c: GSHHS 2.1.0 update
+	* R/checkHoles.R, man/Rgshhs.Rd, src/Rgshhs.c: GSHHS 2.1.0 update
 
 2010-12-16 10:46  rsbivand
 
-	* man/as.ppp.Rd,
-	  man/gzAzimuth.Rd, man/pal2SpatialPolygons.Rd,
+	* man/as.ppp.Rd, man/gzAzimuth.Rd, man/pal2SpatialPolygons.Rd,
 	  man/readShapeLines.Rd, man/readShapePoly.Rd,
 	  man/readShapeSpatial.Rd, man/readSplus.Rd,
 	  man/unionSpatialPolygons.Rd: use rownames for retrieving FIDs
 
 2010-12-16 10:27  rsbivand
 
-	* man/as.ppp.Rd,
-	  man/pal2SpatialPolygons.Rd, man/readShapePoly.Rd,
-	  man/readSplus.Rd, man/unionSpatialPolygons.Rd: use rownames
-	  for retrieving FIDs
+	* man/as.ppp.Rd, man/pal2SpatialPolygons.Rd, man/readShapePoly.Rd,
+	  man/readSplus.Rd, man/unionSpatialPolygons.Rd: use rownames for
+	  retrieving FIDs
 
 2010-11-30 17:37  rsbivand
 
-	* ChangeLog,
-	  inst/ChangeLog: tidy
+	* ChangeLog, inst/ChangeLog: tidy
 
 2010-11-30 00:10  edzer
 
-	* man/as.ppp.Rd,
-	  man/asciigrid.Rd: updated email address
+	* man/as.ppp.Rd, man/asciigrid.Rd: updated email address
 
 2010-11-24 13:40  rsbivand
 
-	* R/union.R:
-	  preparing for rgeos release
+	* R/union.R: preparing for rgeos release
 
 2010-11-24 12:32  rsbivand
 
-	* R/union.R,
-	  man/unionSpatialPolygons.Rd: preparing for rgeos release
+	* R/union.R, man/unionSpatialPolygons.Rd: preparing for rgeos
+	  release
 
 2010-11-24 09:11  rsbivand
 
-	* ChangeLog:
-	  preparing for rgeos release
+	* ChangeLog: preparing for rgeos release
 
 2010-11-24 09:09  rsbivand
 
-	* inst/ChangeLog:
-	  preparing for rgeos release
+	* inst/ChangeLog: preparing for rgeos release
 
 2010-11-24 09:08  rsbivand
 
-	* DESCRIPTION,
-	  R/AAA.R, R/DP.R, R/Rgshhs.R, R/checkHoles.R, R/nowrapRecenter.R,
-	  R/union.R, man/Rgshhs.Rd, man/checkPolygonsHoles.Rd,
-	  man/nowrapRecenter.Rd, man/thinnedSpatialPoly.Rd,
-	  man/unionSpatialPolygons.Rd: preparing for rgeos release
+	* DESCRIPTION, R/AAA.R, R/DP.R, R/Rgshhs.R, R/checkHoles.R,
+	  R/nowrapRecenter.R, R/union.R, man/Rgshhs.Rd,
+	  man/checkPolygonsHoles.Rd, man/nowrapRecenter.Rd,
+	  man/thinnedSpatialPoly.Rd, man/unionSpatialPolygons.Rd: preparing
+	  for rgeos release
 
 2010-11-18 07:53  rsbivand
 
-	* .Rbuildignore:
-	  add .Rbuildignore
+	* .Rbuildignore: add .Rbuildignore
 
 2010-11-18 04:30  sluque
 
-	* R/sun-methods.R,
-	  R/sun.R, man/sun-methods.Rd: Use match.arg() in sun methods,
-	  so that defaults actually work. Minor improvements to
-	  documentation.
+	* R/sun-methods.R, R/sun.R, man/sun-methods.Rd: Use match.arg() in
+	  sun methods, so that defaults actually work.
+	  
+	  Minor improvements to documentation.
 
 2010-11-17 15:49  rsbivand
 
-	* INDEX,
-	  svn2cl.xsl: initial clean
+	* INDEX, svn2cl.xsl: initial clean
 
 2010-11-17 15:49  rsbivand
 
-	* ChangeLog,
-	  oChangeLog: initial clean
+	* ChangeLog, oChangeLog: initial clean
 
 2010-11-17 15:45  rsbivand
 
-	* inst/shapes,
-	  inst/shapes/baltim.dbf, inst/shapes/baltim.shp,
+	* inst/shapes, inst/shapes/baltim.dbf, inst/shapes/baltim.shp,
 	  inst/shapes/baltim.shx, inst/shapes/columbus.dbf,
 	  inst/shapes/columbus.shp, inst/shapes/columbus.shx,
 	  inst/shapes/fylk-val-ll.dbf, inst/shapes/fylk-val-ll.shp,
@@ -636,58 +683,48 @@
 	  inst/shapes/fylk-val.shp, inst/shapes/fylk-val.shx,
 	  inst/shapes/pointZ.dbf, inst/shapes/pointZ.prj,
 	  inst/shapes/pointZ.shp, inst/shapes/pointZ.shx,
-	  inst/shapes/sids.dbf, inst/shapes/sids.shp,
-	  inst/shapes/sids.shx: initial clean
+	  inst/shapes/sids.dbf, inst/shapes/sids.shp, inst/shapes/sids.shx:
+	  initial clean
 
 2010-11-17 15:44  rsbivand
 
-	* inst/shapes:
-	  initial clean
+	* inst/shapes: initial clean
 
 2010-11-17 15:40  rsbivand
 
-	* .:
-	  initial clean
+	* .: initial clean
 
 2010-11-13 15:55  rsbivand
 
-	* adding
-	  getRgshhsMap
+	* adding getRgshhsMap
 
 2010-10-17 18:29  rsbivand
 
-	* ppp
-	  marks as data.frame not vector
+	* ppp marks as data.frame not vector
 
 2010-09-08 17:12  rsbivand
 
-	* zero
-	  nParts for lines
+	* zero nParts for lines
 
 2010-09-08 16:36  rsbivand
 
-	* zero
-	  nParts for lines
+	* zero nParts for lines
 
 2010-08-28 10:35  rsbivand
 
-	* as.double
-	  to storage.mode
+	* as.double to storage.mode
 
 2010-08-26 10:36  rsbivand
 
-	* check
-	  Sys.which value
+	* check Sys.which value
 
 2010-08-12 15:09  rsbivand
 
-	* data
-	  docs fix
+	* data docs fix
 
 2010-04-22 02:48  rsbivand
 
-	* read.shape
-	  filen without extension
+	* read.shape filen without extension
 
 2010-04-12 06:55  rsbivand
 
@@ -695,163 +732,131 @@
 
 2010-04-05 10:42  rsbivand
 
-	* comment
-	  out links to rgeos
+	* comment out links to rgeos
 
 2010-04-03 19:25  rsbivand
 
-	* hide
-	  rgeos
+	* hide rgeos
 
 2010-04-03 16:23  rsbivand
 
-	* DBF
-	  filename, GSHHS C code errors addressed
+	* DBF filename, GSHHS C code errors addressed
 
 2010-04-03 16:02  rsbivand
 
-	* DBF
-	  filename, GSHHS C code errors addressed
+	* DBF filename, GSHHS C code errors addressed
 
 2010-01-17 19:27  rsbivand
 
-	* change
-	  spRbind for SpatialPointsDataFrame objects
+	* change spRbind for SpatialPointsDataFrame objects
 
 2010-01-10 19:42  rsbivand
 
-	* gshhs
-	  hole fix
+	* gshhs hole fix
 
 2010-01-10 19:37  rsbivand
 
-	* gshhs
-	  hole fix
+	* gshhs hole fix
 
 2010-01-08 09:48  rsbivand
 
-	* hole
-	  assignment in GSHHS
+	* hole assignment in GSHHS
 
 2010-01-07 18:07  rsbivand
 
-	* rgeos
-	  integration
+	* rgeos integration
 
 2010-01-07 12:10  rsbivand
 
-	* rgeos
-	  integration
+	* rgeos integration
 
 2009-12-21 12:39  rsbivand
 
-	* adding
-	  CCmaps
+	* adding CCmaps
 
 2009-12-21 12:39  rsbivand
 
-	* adding
-	  CCmaps
+	* adding CCmaps
 
 2009-12-18 21:56  rsbivand
 
-	* GSHHS
-	  upgrade to 2.0
+	* GSHHS upgrade to 2.0
 
 2009-12-03 07:35  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-12-03 07:35  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-12-03 07:34  rsbivand
 
-	* hole
-	  example format change
+	* hole example format change
 
 2009-11-23 11:50  rsbivand
 
-	* reinstate
-	  getinfo.shape
+	* reinstate getinfo.shape
 
 2009-11-20 12:27  rsbivand
 
-	* moving
-	  deprecated functions from namespace
+	* moving deprecated functions from namespace
 
 2009-11-19 20:11  rsbivand
 
-	* adding
-	  thinnedSpatialPoly
+	* adding thinnedSpatialPoly
 
 2009-11-05 16:26  edzer
 
-	* moved
-	  spChFID method, functions and docs to package sp
+	* moved spChFID method, functions and docs to package sp
 
 2009-09-17 08:22  rsbivand
 
-	* fix
-	  documentation links
+	* fix documentation links
 
 2009-07-14 09:17  rsbivand
 
-	* KML
-	  WGS84 notes added
+	* KML WGS84 notes added
 
 2009-06-22 14:53  rsbivand
 
-	* changed
-	  all.equal to identical in closed ring forcing
+	* changed all.equal to identical in closed ring forcing
 
 2009-06-22 14:52  rsbivand
 
-	* changed
-	  all.equal to identical in closed ring forcing
+	* changed all.equal to identical in closed ring forcing
 
 2009-06-10 14:34  rsbivand
 
-	* more
-	  NULL geometry trapping
+	* more NULL geometry trapping
 
 2009-05-26 10:22  rsbivand
 
-	* coercion
-	  from owin/tess to SpatialPolygons
+	* coercion from owin/tess to SpatialPolygons
 
 2009-04-08 17:29  rsbivand
 
-	* improvements
-	  to spatstat support - Adrian Baddeley
+	* improvements to spatstat support - Adrian Baddeley
 
 2009-03-29 15:32  rsbivand
 
-	* drop=FALSE
-	  in reading line and polygon shapefiles
+	* drop=FALSE in reading line and polygon shapefiles
 
 2009-03-17 20:43  vir
 
-	* Minor
-	  fix to allow for a line with NA's just before the END.
+	* Minor fix to allow for a line with NA's just before the END.
 
 2009-03-10 17:24  rsbivand
 
-	* data
-	  web link
+	* data web link
 
 2009-02-18 12:00  rsbivand
 
-	* kml
-	  writing; GSHHS lines shift
+	* kml writing; GSHHS lines shift
 
 2009-02-18 11:58  rsbivand
 
-	* kml
-	  writing; GSHHS lines shift
+	* kml writing; GSHHS lines shift
 
 2009-02-05 17:45  rsbivand
 
@@ -859,28 +864,23 @@
 
 2009-02-05 15:39  rsbivand
 
-	* adding
-	  features to readSplus
+	* adding features to readSplus
 
 2009-02-05 13:39  rsbivand
 
-	* adding
-	  readSplus for WinBUGS
+	* adding readSplus for WinBUGS
 
 2009-01-20 14:39  rsbivand
 
-	* sun
-	  NULL tz
+	* sun NULL tz
 
 2008-11-13 14:07  rsbivand
 
-	* ...
-	  for readGPS()
+	* ... for readGPS()
 
 2008-11-13 14:06  rsbivand
 
-	* ...
-	  for readGPS()
+	* ... for readGPS()
 
 2008-11-12 14:55  rsbivand
 
@@ -892,28 +892,23 @@
 
 2008-08-14 09:09  rsbivand
 
-	* NULL
-	  bug in maps2SP
+	* NULL bug in maps2SP
 
 2008-06-27 08:17  rsbivand
 
-	* readSpatial
-	  wrapper
+	* readSpatial wrapper
 
 2008-06-19 05:57  rsbivand
 
-	* PolySet2SpatialLines
-	  UTM zone update
+	* PolySet2SpatialLines UTM zone update
 
 2008-05-24 17:18  rsbivand
 
-	* GSHHS
-	  support to 1.10
+	* GSHHS support to 1.10
 
 2008-05-24 16:27  rsbivand
 
-	* GSHHS
-	  support to 1.10
+	* GSHHS support to 1.10
 
 2008-04-14 20:49  rsbivand
 
@@ -929,8 +924,7 @@
 
 2008-04-13 16:47  rsbivand
 
-	* PBS
-	  to SP SID bug
+	* PBS to SP SID bug
 
 2008-04-10 14:07  rsbivand
 
@@ -938,18 +932,15 @@
 
 2008-04-04 17:59  rsbivand
 
-	* ABS
-	  nulls
+	* ABS nulls
 
 2008-04-04 17:59  rsbivand
 
-	* ABS
-	  nulls
+	* ABS nulls
 
 2008-03-30 19:48  rsbivand
 
-	* GSHHS
-	  clip
+	* GSHHS clip
 
 2008-03-03 21:47  rsbivand
 
@@ -957,53 +948,43 @@
 
 2008-02-09 12:42  rsbivand
 
-	* line
-	  lengths in help
+	* line lengths in help
 
 2008-01-30 20:53  rsbivand
 
-	* SG
-	  creation
+	* SG creation
 
 2008-01-30 08:26  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 11:36  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 11:00  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 10:37  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 09:52  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 09:03  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-29 08:50  rsbivand
 
-	* ppp
-	  + getinfo
+	* ppp + getinfo
 
 2008-01-20 15:08  rsbivand
 
-	* pbs
-	  to sp
+	* pbs to sp
 
 2007-12-13 17:32  rsbivand
 
@@ -1011,18 +992,15 @@
 
 2007-12-09 18:03  rsbivand
 
-	* elide
-	  shift
+	* elide shift
 
 2007-11-21 22:37  rsbivand
 
-	* elide
-	  bug
+	* elide bug
 
 2007-11-16 09:12  rsbivand
 
-	* GSHHS
-	  to 1.5
+	* GSHHS to 1.5
 
 2007-11-10 13:17  rsbivand
 
@@ -1030,13 +1008,11 @@
 
 2007-10-31 15:43  rsbivand
 
-	* thingy
-	  to slot
+	* thingy to slot
 
 2007-10-31 13:46  rsbivand
 
-	* thingy
-	  to slot
+	* thingy to slot
 
 2007-10-23 12:50  rsbivand
 
@@ -1048,23 +1024,19 @@
 
 2007-10-06 17:38  rsbivand
 
-	* elide
-	  first cut
+	* elide first cut
 
 2007-10-06 10:06  rsbivand
 
-	* elide
-	  first cut
+	* elide first cut
 
 2007-09-29 16:37  rsbivand
 
-	* pointLabel
-	  update
+	* pointLabel update
 
 2007-09-26 09:09  rsbivand
 
-	* Ascii
-	  Grid dec
+	* Ascii Grid dec
 
 2007-09-18 08:19  rsbivand
 
@@ -1072,28 +1044,23 @@
 
 2007-09-14 20:14  rsbivand
 
-	* Mondrian
-	  new format
+	* Mondrian new format
 
 2007-09-14 06:58  rsbivand
 
-	* pass
-	  through max_nchar
+	* pass through max_nchar
 
 2007-09-05 16:09  rsbivand
 
-	* double
-	  NA at end of map coords
+	* double NA at end of map coords
 
 2007-07-25 08:49  rsbivand
 
-	* 3D
-	  polylist, write line shape, owin poly
+	* 3D polylist, write line shape, owin poly
 
 2007-07-19 19:33  rsbivand
 
-	* 3D
-	  polylist writing
+	* 3D polylist writing
 
 2007-06-11 08:05  rsbivand
 
@@ -1109,13 +1076,11 @@
 
 2007-06-05 13:31  rsbivand
 
-	* con
-	  correction
+	* con correction
 
 2007-05-08 16:35  rsbivand
 
-	* revert
-	  spatstat coerce
+	* revert spatstat coerce
 
 2007-05-07 08:55  rsbivand
 
@@ -1123,28 +1088,23 @@
 
 2007-04-28 19:41  rsbivand
 
-	* doc
-	  error
+	* doc error
 
 2007-04-27 16:37  rsbivand
 
-	* resolve
-	  GPS conflict
+	* resolve GPS conflict
 
 2007-04-21 04:27  rsbivand
 
-	* GE
-	  dimnames
+	* GE dimnames
 
 2007-04-16 04:01  rsbivand
 
-	* sp
-	  problem and gps
+	* sp problem and gps
 
 2007-04-16 02:40  rsbivand
 
-	* sp
-	  problem and gps
+	* sp problem and gps
 
 2007-03-29 14:34  rsbivand
 
@@ -1156,33 +1116,27 @@
 
 2007-02-09 20:09  rsbivand
 
-	* force_ring
-	  in readShapePoly
+	* force_ring in readShapePoly
 
 2007-02-01 14:28  rsbivand
 
-	* sun
-	  manual tidy
+	* sun manual tidy
 
 2007-01-21 10:50  rsbivand
 
-	* GE_PNG
-	  additions
+	* GE_PNG additions
 
 2007-01-20 21:36  rsbivand
 
-	* GE_PNG
-	  additions
+	* GE_PNG additions
 
 2007-01-16 09:39  rsbivand
 
-	* im
-	  and sun-methods
+	* im and sun-methods
 
 2007-01-16 09:23  rsbivand
 
-	* im
-	  and sun-methods
+	* im and sun-methods
 
 2006-12-02 15:38  rsbivand
 
@@ -1198,38 +1152,31 @@
 
 2006-10-31 13:07  rsbivand
 
-	* sun
-	  and r-spatial integration
+	* sun and r-spatial integration
 
 2006-10-31 08:31  rsbivand
 
-	* sun
-	  and r-spatial integration
+	* sun and r-spatial integration
 
 2006-10-29 13:53  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-28 19:56  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-28 17:23  rsbivand
 
-	* sun
-	  ephemerides
+	* sun ephemerides
 
 2006-10-19 20:03  rsbivand
 
-	* dostInPolys
-	  NULL
+	* dostInPolys NULL
 
 2006-09-21 19:42  rsbivand
 
-	* R
-	  2.4.0
+	* R 2.4.0
 
 2006-08-30 14:50  rsbivand
 
@@ -1241,13 +1188,11 @@
 
 2006-05-02 07:07  rsbivand
 
-	* Geolytics
-	  bug
+	* Geolytics bug
 
 2006-04-10 19:21  rsbivand
 
-	* fix
-	  to sp2WB, readAsciiGrid, writeAsciiGrid
+	* fix to sp2WB, readAsciiGrid, writeAsciiGrid
 
 2006-03-20 08:32  rsbivand
 
@@ -1259,8 +1204,7 @@
 
 2006-03-01 08:53  rsbivand
 
-	* checks
-	  on polylists
+	* checks on polylists
 
 2006-01-11 11:08  rsbivand
 
@@ -1276,18 +1220,15 @@
 
 2006-01-08 21:23  rsbivand
 
-	* adding
-	  sp2tmap
+	* adding sp2tmap
 
 2006-01-08 18:34  rsbivand
 
-	* adding
-	  sp2tmap
+	* adding sp2tmap
 
 2005-12-15 15:00  rsbivand
 
-	* to
-	  5-4
+	* to 5-4
 
 2005-12-12 21:27  rsbivand
 
@@ -1295,33 +1236,27 @@
 
 2005-10-03 17:44  rsbivand
 
-	* lines
-	  bugs
+	* lines bugs
 
 2005-09-14 21:08  rsbivand
 
-	* as
-	  at 0.5-2
+	* as at 0.5-2
 
 2005-09-13 17:24  rsbivand
 
-	* remove
-	  suggested splancs
+	* remove suggested splancs
 
 2005-09-13 14:53  rsbivand
 
-	* remove
-	  suggested splancs
+	* remove suggested splancs
 
 2005-09-09 14:28  rsbivand
 
-	* ...
-	  in plot.Map
+	* ... in plot.Map
 
 2005-09-08 20:28  rsbivand
 
-	* dotsinpolys
-	  begun
+	* dotsinpolys begun
 
 2005-09-08 11:11  rsbivand
 
@@ -1333,26 +1268,21 @@
 
 2005-09-05 09:00  rsbivand
 
-	* removing
-	  _
+	* removing _
 
 2005-09-03 16:19  rsbivand
 
-	* added
-	  ...  to degAxis()
+	* added ... to degAxis()
 
 2005-09-02 07:40  rsbivand
 
-	* more
-	  asciigrid
+	* more asciigrid
 
 2005-09-01 18:26  rsbivand
 
-	* Initial
-	  revision
+	* Initial revision
 
-2005-09-01 18:26
+2005-09-01 18:26  
 
-	* New
-	  repository initialized by cvs2svn.
+	* New repository initialized by cvs2svn.
 
diff --git a/inst/README b/inst/README
index b8ff71a..513ca6e 100644
--- a/inst/README
+++ b/inst/README
@@ -62,6 +62,9 @@ Files: inst/shapes/pointZ.* are a sample of points from a 3D point shapefile
 kindly contributed by Michael Toews to be used here for illustrative purposes;
 this sample is written out using writePointsShape(). 
 
+File: inst/shapes/Testing.kml is contributed by Kent Johnson, released 
+under GPL (>=2) as part of maptools.
+
 File: data/wrld_simpl.rda is a modified SpatialPolygonsDataFrame object
 generated from the TM_WORLD_BORDERS_SIMPL-0.2 shapefile downloaded from
 http://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip with the 
diff --git a/inst/doc/combine_maptools.R b/inst/doc/combine_maptools.R
index 8a68f03..7e11104 100644
--- a/inst/doc/combine_maptools.R
+++ b/inst/doc/combine_maptools.R
@@ -121,7 +121,7 @@ names(nc90)
 ###################################################
 ### code chunk number 15: combine_maptools.Rnw:175-176
 ###################################################
-try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")))
+try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")), silent=TRUE)
 
 
 ###################################################
diff --git a/inst/doc/combine_maptools.Rnw b/inst/doc/combine_maptools.Rnw
index a4ac4b1..d9e8f2a 100644
--- a/inst/doc/combine_maptools.Rnw
+++ b/inst/doc/combine_maptools.Rnw
@@ -169,11 +169,11 @@ into difficulties:
 <<echo=TRUE,keep.source=FALSE>>= 
 names(nc90)
 @
-<<echo=TRUE,eval=FALSE,keep.source=FALSE>>= 
+<<echo=TRUE,eval=FALSE,keep.source=FALSE,results=hide>>= 
 nc90a <- spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep=""))
 @
 <<echo=FALSE,eval=TRUE,results=hide>>= 
-try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")))
+try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")), silent=TRUE)
 @
 <<eval=TRUE,echo=FALSE>>= 
 cat(try1)
diff --git a/inst/doc/combine_maptools.pdf b/inst/doc/combine_maptools.pdf
index 79d67cd..ae2fad0 100644
Binary files a/inst/doc/combine_maptools.pdf and b/inst/doc/combine_maptools.pdf differ
diff --git a/inst/shapes/Testing.kml b/inst/shapes/Testing.kml
new file mode 100644
index 0000000..d389de5
--- /dev/null
+++ b/inst/shapes/Testing.kml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
+<Document>
+	<name>Testing.kml</name>
+	<Style id="Test"><LineStyle><color>ff00ff00</color><width>4</width></LineStyle><PolyStyle><color>ff00ff00</color></Style>
+	<Placemark>
+		<name>Testing</name>
+		<styleUrl>#Test</styleUrl>
+		<LineString>
+			<tessellate>1</tessellate>
+			<coordinates>-70.97272992211686,42.32624474949898,0 -71.452011423095,42.72753603034216,0 -71.12169115754595,42.98038580610469,0</coordinates></LineString>
+	</Placemark>
+</Document>
+</kml>
diff --git a/man/GE_SpatialGrid.Rd b/man/GE_SpatialGrid.Rd
index cc3d673..848829c 100644
--- a/man/GE_SpatialGrid.Rd
+++ b/man/GE_SpatialGrid.Rd
@@ -43,7 +43,7 @@ summary(Sobj_SpatialGrid(qk)$SG)
 t2 <- Sobj_SpatialGrid(qk, n=10000)$SG
 summary(t2)
 prod(slot(slot(t2, "grid"), "cells.dim"))
-proj4string(qk) <- CRS("+proj=longlat")
+proj4string(qk) <- CRS("+proj=longlat +ellps=WGS84")
 tf <- tempfile()
 SGqk <- GE_SpatialGrid(qk)
 png(file=paste(tf, ".png", sep=""), width=SGqk$width, height=SGqk$height,
@@ -56,9 +56,9 @@ kmlOverlay(SGqk, paste(tf, ".kml", sep=""), paste(tf, ".png", sep=""))
 qk0 <- quakes
 qk0$long <- ifelse(qk0$long <= 180, qk0$long, qk0$long-360)
 qk0a <- SpatialPointsDataFrame(qk0[, c(2:1)], qk0)
-proj4string(qk0a) <- CRS("+proj=longlat")
-writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
-system(paste("googleearth ", tf, ".kml", sep=""))
+proj4string(qk0a) <- CRS("+proj=longlat +ellps=WGS84")
+# writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
+# system(paste("googleearth ", tf, ".kml", sep=""))
 }
 options(example.ask=opt_exask)
 }
diff --git a/man/SpatialLines2PolySet.Rd b/man/SpatialLines2PolySet.Rd
index 8de5473..ca10f79 100644
--- a/man/SpatialLines2PolySet.Rd
+++ b/man/SpatialLines2PolySet.Rd
@@ -32,13 +32,12 @@ PolySet2SpatialPolygons(PS, close_polys=TRUE)
 \seealso{\code{\link[PBSmapping]{PolySet}}, \code{\link{MapGen2SL}}}
 
 \examples{
-if(require(PBSmapping)) {
-if(require(maps)) {
+if(require(PBSmapping) && require(maps)) {
 nor_coast_lines <- map("world", interior=FALSE, plot=FALSE, xlim=c(4,32),
  ylim=c(58,72))
 nor_coast_lines <- pruneMap(nor_coast_lines, xlim=c(4,32), ylim=c(58,72))
 nor_coast_lines_sp <- map2SpatialLines(nor_coast_lines,
- proj4string=CRS("+proj=longlat +datum=wgs84"))
+ proj4string=CRS("+proj=longlat +datum=WGS84 +ellps=WGS84"))
 nor_coast_lines_PS <- SpatialLines2PolySet(nor_coast_lines_sp)
 summary(nor_coast_lines_PS)
 plotLines(nor_coast_lines_PS)
@@ -48,13 +47,13 @@ nor_coast_poly <- map("world", "norway", fill=TRUE, col="transparent",
  plot=FALSE, ylim=c(58,72))
 IDs <- sapply(strsplit(nor_coast_poly$names, ":"), function(x) x[1])
 nor_coast_poly_sp <- map2SpatialPolygons(nor_coast_poly, IDs=IDs,
- proj4string=CRS("+proj=longlat +datum=wgs84"))
+ proj4string=CRS("+proj=longlat +datum=WGS84 +ellps=WGS84"))
 nor_coast_poly_PS <- SpatialPolygons2PolySet(nor_coast_poly_sp)
 summary(nor_coast_poly_PS)
 plotPolys(nor_coast_poly_PS)
 o1 <- PolySet2SpatialPolygons(nor_coast_poly_PS)
 plot(o1, axes=TRUE)
-}}
+}
 }
 \keyword{spatial}
 
diff --git a/man/as.ppp.Rd b/man/as.ppp.Rd
index 11e92f1..d866f64 100644
--- a/man/as.ppp.Rd
+++ b/man/as.ppp.Rd
@@ -11,6 +11,7 @@
 \alias{coerce,tess,SpatialPolygons-method}
 \alias{coerce,owin,SpatialPolygons-method}
 \alias{coerce,SpatialGridDataFrame,im-method}
+\alias{coerce,RasterLayer,im-method}
 \alias{as.ppp.SpatialGridDataFrame}
 \alias{as.ppp.SpatialPoints}
 \alias{as.ppp.SpatialPointsDataFrame}
@@ -34,6 +35,7 @@
 \alias{as.SpatialGridDataFrame.ppp}
 \alias{as.SpatialPoints.ppp}
 \alias{as.SpatialGridDataFrame.im}
+\alias{as.im.RasterLayer}
 
 \title{coercion between sp objects and spatstat objects}
 \description{
@@ -53,6 +55,7 @@ S4-style as() coercion works between objects of S4 sp classes to spatstat S3 cla
 \item{coerce}{\code{signature(from = "SpatialPixelsDataFrame", to = "owin")}}
 \item{coerce}{\code{signature(from = "SpatialGridDataFrame", to = "owin")}}
 \item{coerce}{\code{signature(from = "SpatialGridDataFrame", to = "im")}}
+%\item{coerce}{\code{signature(from = "RasterLayer", to = "im")}}
 \item{coerce}{\code{signature(from = "im", to = "SpatialGridDataFrame")}}
 \item{coerce}{\code{signature(from = "ppp", to = "SpatialGridDataFrame")}}
 \item{coerce}{\code{signature(from = "ppp", to = "SpatialPointsDataFrame")}}
@@ -75,6 +78,7 @@ as.psp.SpatialLinesDataFrame(from, ..., window=NULL, marks=NULL, fatal)
 as.SpatialLines.psp(from)
 as.SpatialPolygons.tess(x)
 as.SpatialPolygons.owin(x)
+as.im.RasterLayer(from)
 }
 \arguments{
   \item{from, x}{object to coerce from}
@@ -91,7 +95,7 @@ To perform the checking later, \code{owinpolycheck(W, verbose=TRUE)}.}
 
 \author{Edzer Pebesma \email{edzer.pebesma at uni-muenster.de}, Roger Bivand}
 \examples{
-library(spatstat)
+if (require(spatstat, quietly=TRUE)) {
 data(meuse)
 coordinates(meuse) = ~x+y
 zn1 <- as(meuse["zinc"], "ppp")
@@ -100,7 +104,7 @@ plot(zn1)
 as(as(meuse, "SpatialPoints"), "ppp")
 data(meuse.grid)
 gridded(meuse.grid) = ~x+y
-mg_owin <- as(meuse.grid, "owin")
+mg_owin <- as(meuse.grid["dist"], "owin")
 zn1a <- ppp(x=zn1$x, y=zn1$y, marks=zn1$marks, window=mg_owin)
 zn1a
 plot(zn1a)
@@ -119,7 +123,7 @@ xx_back <- as(mr_psp, "SpatialLines")
 plot(xx_back)
 xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
  proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
-xx_psp <- as(xx, "psp")
+xx_psp <- as(xx["LENGTH"], "psp")
 xx_psp
 plot(xx_psp)
 xx_back <- as(xx_psp, "SpatialLines")
@@ -150,5 +154,11 @@ mg_im <- as(mg_dist, "im")
 plot(mg_im)
 mg2 <- as.SpatialGridDataFrame.im(mg_im)
 image(mg2, axes=TRUE)
+if (require(raster, quietly=TRUE)) {
+r <- as(mg2, "RasterLayer")
+r_im <- as.im.RasterLayer(r)
+plot(r_im)
+}
+}
 }
 \keyword{spatial}
diff --git a/man/dotsInPolys.Rd b/man/dotsInPolys.Rd
index adab75d..aafa497 100644
--- a/man/dotsInPolys.Rd
+++ b/man/dotsInPolys.Rd
@@ -19,7 +19,7 @@ not random}
   \item{compatible}{what to return, if TRUE a a list of matrices of point coordinates, one matrix for each member of pl, if false a SpatialPointsDataFrame with polygon ID values}
 }
 \details{
- With f="random", the dots are placed in the polygon at random, f="regular" - in a grid pattern (number of dots not guaranteed to be the same as the count). When the polygon is made up of more than one part, the dots will be placed in proportion to the relative areas of the clockwise rings (anticlockwise are taken as holes). From maptools release 0.5-2, correction is made for holes in the placing of the dots, but depends on hole values being correctly set, which they often are not. The w [...]
+ With f="random", the dots are placed in the polygon at random, f="regular" - in a grid pattern (number of dots not guaranteed to be the same as the count). When the polygon is made up of more than one part, the dots will be placed in proportion to the relative areas of the clockwise rings (anticlockwise are taken as holes). From maptools release 0.5-2, correction is made for holes in the placing of the dots, but depends on hole values being correctly set, which they often are not.  
 }
 \value{
   If compatible=TRUE, the function returns a list of matrices of point coordinates, one matrix for each member of pl. If x[i] is zero, the list element is NULL, and can be tested when plotting - see the examples. If compatible=FALSE (default), it returns a SpatialPointsDataFrame with polygon ID values as the only column in the data slot.
@@ -34,7 +34,6 @@ not random}
 nc_SP <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
  proj4string=CRS("+proj=longlat  +ellps=clrk66"))
 \dontrun{
-library(spgpc)
 pls <- slot(nc_SP, "polygons")
 pls_new <- lapply(pls, checkPolygonsHoles)
 nc_SP <- SpatialPolygonsDataFrame(SpatialPolygons(pls_new,
diff --git a/man/getKMLcoordinates.Rd b/man/getKMLcoordinates.Rd
index 00cceae..beebcd3 100644
--- a/man/getKMLcoordinates.Rd
+++ b/man/getKMLcoordinates.Rd
@@ -33,6 +33,8 @@ kmlPolygon(sw, kmlfile=tf, name="South Africa", col="#df0000aa", lwd=5,
     kmldescription="This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
 zz <- getKMLcoordinates(tf, ignoreAltitude=TRUE)
 str(zz)
+zz <- getKMLcoordinates(system.file("shapes/Testing.kml", package="maptools"))
+str(zz)
 }
 \keyword{spatial}
 
diff --git a/man/gzAzimuth.Rd b/man/gzAzimuth.Rd
index 136a0f5..c555206 100644
--- a/man/gzAzimuth.Rd
+++ b/man/gzAzimuth.Rd
@@ -23,7 +23,7 @@ trackAzimuth(track, type="snyder_sphere")
 \value{
   values in decimal degrees - zero is North - of the azimuth from the \code{from} coordinates to the \code{to} coordinate.
 }
-\references{Snyder JP (1987) Map projections - a working manual, USGS Professional Paper 1395; Abdali SK (1997) "The Correct Qibla", \url{http://patriot.net/users/abdali/ftp/qibla.pdf}}
+\references{Snyder JP (1987) Map projections - a working manual, USGS Professional Paper 1395; Abdali SK (1997) "The Correct Qibla", formerly at http://patriot.net/users/abdali/ftp/qibla.pdf}
 \author{Roger Bivand, with contributions by Sebastian Luque}
 
 \examples{
diff --git a/man/kmlLine.Rd b/man/kmlLine.Rd
index 5f7f38d..0138d9f 100644
--- a/man/kmlLine.Rd
+++ b/man/kmlLine.Rd
@@ -48,7 +48,7 @@ The following color specifications are allowed: \code{'red'}, \code{2}, or as he
 
 \examples{
 xx <- readShapeSpatial(system.file("shapes/fylk-val-ll.shp",
-      package="maptools")[1], proj4string=CRS("+proj=longlat"))
+      package="maptools")[1], proj4string=CRS("+proj=longlat +ellps=WGS84"))
 out <- sapply(slot(xx, "lines"), function(x) { kmlLine(x,
     name=slot(x, "ID"), col="blue", lwd=1.5, 
     description=paste("river:", slot(x, "ID"))) })
diff --git a/man/kmlLines.Rd b/man/kmlLines.Rd
index 14c0db4..7f5aadf 100644
--- a/man/kmlLines.Rd
+++ b/man/kmlLines.Rd
@@ -51,7 +51,7 @@ The following color specifications are allowed: \code{'red'}, \code{2}, or as he
 library(maptools)
 # load line object
 rivers <- readShapeSpatial(system.file("shapes/fylk-val-ll.shp",
-                           package="maptools")[1], proj4string=CRS("+proj=longlat"))
+                           package="maptools")[1], proj4string=CRS("+proj=longlat +ellps=WGS84"))
 # create kml file
 kmlLines(rivers, kmlfile = "rivers.kml", name = "R Lines", 
          description = "Hello!", col = "blue", visibility = 1, lwd = 1, 
diff --git a/man/kmlOverlay.Rd b/man/kmlOverlay.Rd
index 2682847..d371593 100644
--- a/man/kmlOverlay.Rd
+++ b/man/kmlOverlay.Rd
@@ -32,7 +32,7 @@ x is a character vector containing the generated lines of the kml file
 \examples{
 opt_exask <- options(example.ask=FALSE)
 qk <- SpatialPointsDataFrame(quakes[, c(2:1)], quakes)
-proj4string(qk) <- CRS("+proj=longlat")
+proj4string(qk) <- CRS("+proj=longlat +ellps=WGS84")
 tf <- tempfile()
 SGqk <- GE_SpatialGrid(qk)
 png(file=paste(tf, ".png", sep=""), width=SGqk$width, height=SGqk$height,
@@ -42,13 +42,13 @@ plot(qk, xlim=SGqk$xlim, ylim=SGqk$ylim, setParUsrBB=TRUE)
 dev.off()
 kmlOverlay(SGqk, paste(tf, ".kml", sep=""), paste(tf, ".png", sep=""))
 \dontrun{
-library(rgdal)
-qk0 <- quakes
-qk0$long <- ifelse(qk0$long <= 180, qk0$long, qk0$long-360)
-qk0a <- SpatialPointsDataFrame(qk0[, c(2:1)], qk0)
-proj4string(qk0a) <- CRS("+proj=longlat")
-writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
-system(paste("googleearth ", tf, ".kml", sep=""))
+#library(rgdal)
+#qk0 <- quakes
+#qk0$long <- ifelse(qk0$long <= 180, qk0$long, qk0$long-360)
+#qk0a <- SpatialPointsDataFrame(qk0[, c(2:1)], qk0)
+#proj4string(qk0a) <- CRS("+proj=longlat +ellps=WGS84")
+#writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
+#system(paste("googleearth ", tf, ".kml", sep=""))
 }
 options(example.ask=opt_exask)
 }
diff --git a/man/kmlPoints.Rd b/man/kmlPoints.Rd
index 2d82107..e5661c1 100644
--- a/man/kmlPoints.Rd
+++ b/man/kmlPoints.Rd
@@ -8,7 +8,7 @@
 \usage{
 kmlPoints(obj=NULL, kmlfile=NULL, kmlname="", kmldescription="",
     name=NULL, description="",
-    icon="http://google.com/mapfiles/kml/paddle/wht-diamond.png")
+    icon="http://www.gstatic.com/mapspro/images/stock/962-wht-diamond-blank.png")
 }
 
 \arguments{
@@ -38,7 +38,7 @@ y is a list with the elements \code{header} and \code{footer} representing the K
 }
 
 \section{KML icons}{
-The default icon URL is \url{http://google.com/mapfiles/kml/paddle/wht-diamond.png}. Additional icons are available at:
+The default icon URL is \url{http://www.gstatic.com/mapspro/images/stock/962-wht-diamond-blank.png}. Additional icons are available at:
 \url{http://sites.google.com/site/gmapsdevelopment}.
 }
 
@@ -54,7 +54,7 @@ kmlname <- "Oregon Splash Dams"
 kmldescription <- paste("Data for Splash Dams in western Oregon.",
  "See http://www.fs.fed.us/pnw/lwm/aem/people/burnett.html#projects_activities",
  "for more information.")
-icon <- "http://google.com/mapfiles/kml/paddle/wht-diamond.png"
+icon <- "http://www.gstatic.com/mapspro/images/stock/962-wht-diamond-blank.png"
 name <- paste("Dam on",SplashDams$streamName)
 description <- paste("<b>owner:</b>", SplashDams$owner, "<br><b>dates:</b>", SplashDams$datesUsed)
 
diff --git a/man/leglabs.Rd b/man/leglabs.Rd
index 459698d..509ed5e 100644
--- a/man/leglabs.Rd
+++ b/man/leglabs.Rd
@@ -5,7 +5,7 @@
 \description{
 \code{leglabs} makes character strings from the same break points. The \code{plot.polylist()} function may be used as a generic S3 method. }
 \usage{
-leglabs(vec, under="under", over="over", between="-")
+leglabs(vec, under="under", over="over", between="-", reverse=FALSE)
 }
 
 \arguments{
@@ -13,6 +13,7 @@ leglabs(vec, under="under", over="over", between="-")
   \item{under}{character value for under}
   \item{over}{character value for over}
   \item{between}{character value for between}
+  \item{reverse}{flag to reverse order of values, you will also need to reorder colours, see example}
 %  \item{y}{numeric vector to be broken into class intervals}
 %  \item{rightmost.closed}{as in findInterval()}
 %  \item{all.inside}{as in findInterval()}
@@ -29,7 +30,14 @@ plot(mappolys, col=colours[findInterval(mappolys$CRIME, brks,
  all.inside=TRUE)])
 legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=leglabs(brks),
   fill=colours, bty="n")
-invisible(title(main=paste("Columbus OH: residential burglaries and vehicle",
- "thefts per thousand households, 1980", sep="\n")))
+title(main=paste("Columbus OH: residential burglaries and vehicle",
+ "thefts per thousand households, 1980", sep="\n"))
+#legend with reversed order
+plot(mappolys, col=colours[findInterval(mappolys$CRIME, brks,
+ all.inside=TRUE)])
+legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=leglabs(brks, reverse = TRUE),
+  fill=rev(colours), bty="n")
+title(main=paste("Columbus OH: residential burglaries and vehicle",
+ "thefts per thousand households, 1980 (reversed legend)", sep="\n"))
 }
 \keyword{spatial}
diff --git a/man/map2SpatialPolygons.Rd b/man/map2SpatialPolygons.Rd
index 9a025f0..77ff342 100644
--- a/man/map2SpatialPolygons.Rd
+++ b/man/map2SpatialPolygons.Rd
@@ -8,7 +8,7 @@
   These functions may be used to convert map objects returned by the map function in the maps package to suitable objects defined in the sp package. In the examples below, arguments are shown for retrieving first polygons by name, then lines by window.
 }
 \usage{
-map2SpatialPolygons(map, IDs, proj4string = CRS(as.character(NA)))
+map2SpatialPolygons(map, IDs, proj4string = CRS(as.character(NA)), checkHoles=FALSE)
 map2SpatialLines(map, IDs=NULL, proj4string = CRS(as.character(NA)))
 pruneMap(map, xlim=NULL, ylim=NULL)
 }
@@ -18,9 +18,12 @@ pruneMap(map, xlim=NULL, ylim=NULL)
   \item{IDs}{Unique character ID values for each output Polygons object; the input IDs can be an integer or character vector with duplicates, where the duplicates will be combined as a single output Polygons object}
   \item{proj4string}{Object of class \code{"CRS"};
 	holding a valid proj4 string}
+  \item{checkHoles}{default=FALSE, if TRUE call \code{checkPolygonsHoles}internally to check hole assignment, (by default no polygon objects are holes)}
   \item{xlim,ylim}{limits for pruning a map object - should only be used for lines, because polygons will not be closed}
 }
 
+\details{Any zero area output geometries are dropped, and warnings are issued.}
+
 \value{
   \code{map2SpatialPolygons} returns a SpatialPolygons object and \code{map2SpatialLines} returns a SpatialLines object (objects defined in the sp package); \code{pruneMap} returns a modified map object defined in the maps package
 }
@@ -54,6 +57,15 @@ nor_coast_lines_sp <- map2SpatialLines(nor_coast_lines,
  proj4string=CRS("+proj=longlat +datum=WGS84"))
 plot(nor_coast_poly_sp, col="grey", axes=TRUE)
 plot(nor_coast_lines_sp, col="blue", add=TRUE)
+worldmap <- map("world", fill=TRUE, plot=FALSE)
+worldmapPolys <- map2SpatialPolygons(worldmap, 
+ IDs=sapply(strsplit(worldmap$names, ":"), "[", 1L), 
+ proj4string=CRS("+proj=longlat +datum=WGS84"))
+if (rgeosStatus()) {
+require(rgeos)
+vals <- rgeos::gIsValid(worldmapPolys, byid=TRUE, reason=TRUE)
+print(table(sapply(strsplit(vals, "\\\\["), "[", 1)))
+}
 }
 }
 \keyword{spatial}
diff --git a/man/nowrapRecenter.Rd b/man/nowrapRecenter.Rd
index b6c8353..b70090d 100644
--- a/man/nowrapRecenter.Rd
+++ b/man/nowrapRecenter.Rd
@@ -7,17 +7,17 @@
   When recentering a world map, say to change an "Atlantic" view with longitude range -180 to 180, to a "Pacific" view, with longitude range 0 to 360, polygons crossed by the new offset, here 0/360, need to be clipped into left and right sub.polygons to avoid horizontal scratches across the map. The \code{nowrapSpatialPolygons} function performs this operation using polygon intersection, and \code{nowrapRecenter} recenters the output SpatialPolygons object. 
 }
 \usage{
-nowrapRecenter(obj, offset = 0, eps = rep(.Machine$double.eps^(1/2), 2),
+nowrapRecenter(obj, offset = 0, eps = rep(.Machine$double.eps^(1/2.5), 2),
  avoidGEOS = FALSE)
-nowrapSpatialPolygons(obj, offset = 0, eps=rep(.Machine$double.eps^(1/2), 2),
+nowrapSpatialPolygons(obj, offset = 0, eps=rep(.Machine$double.eps^(1/2.5), 2),
  avoidGEOS = FALSE)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
   \item{obj}{ A SpatialPolygons object }
   \item{offset}{ offset from the Greenwich meridian }
-  \item{eps}{vector of two (left and right) fuzz factors to retract the ring from the offset (square root to accommodate \pkg{rgeos} precision rules)}
-  \item{avoidGEOS}{use \pkg{gpclib} code even if \pkg{rgeos} is available}
+  \item{eps}{vector of two (left and right) fuzz factors to retract the ring from the offset (2.5 root to accommodate \pkg{rgeos} precision rules)}
+  \item{avoidGEOS}{default FALSE; use \pkg{polyclip} or \pkg{gpclib} code even if \pkg{rgeos} is available}
 }
 
 \value{
@@ -27,13 +27,13 @@ nowrapSpatialPolygons(obj, offset = 0, eps=rep(.Machine$double.eps^(1/2), 2),
 \author{Roger Bivand}
 
 
-\seealso{\code{\link[sp]{recenter-methods}}, \code{\link[sp]{nowrapSpatialLines}}}
+\seealso{\code{\link[sp]{recenter-methods}}, \code{\link{nowrapSpatialLines}}}
 
 \examples{
 \dontrun{
-library(maps)
+if (require(maps)) {
 world <- map("world", fill=TRUE, col="transparent", plot=FALSE)
-worldSpP <- map2SpatialPolygons(world, world$names, CRS("+proj=longlat"))
+worldSpP <- map2SpatialPolygons(world, world$names, CRS("+proj=longlat +ellps=WGS84"))
 worldSpP <- worldSpP[-grep("Antarctica", row.names(worldSpP)),]
 # incomplete polygons
 worldSpP <- worldSpP[-grep("Ghana", row.names(worldSpP)),]
@@ -47,11 +47,12 @@ worldSpPnr <- nowrapRecenter(worldSpP)
 plot(worldSpPnr)
 title("Pacific view with polygon splitting")
 }
+}
 if (rgeosStatus()) {
 crds <- matrix(c(-1, 1, 1, -1, 50, 50, 52, 52), ncol=2)
 rcrds <- rbind(crds, crds[1,])
 SR <- SpatialPolygons(list(Polygons(list(Polygon(rcrds)), ID="r1")),
- proj4string=CRS("+proj=longlat"))
+ proj4string=CRS("+proj=longlat +ellps=WGS84"))
 bbox(SR)
 SRr <- recenter(SR)
 bbox(SRr)
diff --git a/man/nowrapSpatialLines.Rd b/man/nowrapSpatialLines.Rd
new file mode 100644
index 0000000..e72a957
--- /dev/null
+++ b/man/nowrapSpatialLines.Rd
@@ -0,0 +1,41 @@
+\name{nowrapSpatialLines}
+\alias{nowrapSpatialLines}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{Split SpatialLines components at offset}
+\description{
+  When recentering a world map, most often from the "Atlantic" view with longitudes with range -180 to 180, to the "pacific" view with longitudes with range 0 to 360, lines crossing the offset (0 for this conversion) get stretched horizonally. This function breaks Line objects at the offset (usually Greenwich), inserting a very small gap, and reassembling the Line objects created as Lines. The \pkg{rgeos} package is required to use this function. 
+}
+\usage{
+nowrapSpatialLines(obj, offset = 0, eps = rep(.Machine$double.eps^(1/2.5), 2))
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{obj}{A Spatial Lines object}
+  \item{offset}{default 0, untried for other values}
+  \item{eps}{vector of two fuzz values, both default 2.5 root of double.eps}
+}
+
+\value{
+  A Spatial Lines object
+}
+
+\author{Roger Bivand}
+
+\seealso{\code{\link[sp]{recenter-methods}}, \code{\link{nowrapSpatialPolygons}}}
+\examples{
+Sl <- SpatialLines(list(Lines(list(Line(cbind(sin(seq(-4,4,0.4)),
+ seq(1,21,1)))), "1")), proj4string=CRS("+proj=longlat +ellps=WGS84"))
+summary(Sl)
+nwSL <- nowrapSpatialLines(Sl)
+summary(nwSL)
+if(require(maps)) {
+worldmap <- map("world", plot=FALSE)
+worldmapLines <- map2SpatialLines(worldmap, proj4string=CRS("+proj=longlat +datum=WGS84"))
+bbox(worldmapLines)
+if (require(rgeos)) {
+t0 <- nowrapSpatialLines(worldmapLines, offset=180)
+bbox(t0)
+}
+}
+}
+\keyword{spatial}
diff --git a/man/readGPS.Rd b/man/readGPS.Rd
index 0760c60..81674e7 100644
--- a/man/readGPS.Rd
+++ b/man/readGPS.Rd
@@ -27,22 +27,22 @@ The function just wraps: gpsbabel -i INTYPE -f INFILE -o tabsep -F - in system()
 
 \examples{
 \dontrun{
-b1 <- readGPS(f="usb:")
-str(b1)
-b2 <- b1[1:172,]
-wp0 <- b2[,c(2,3,4,8,9,19)]
-str(wp0)
-wp0$long <- wp0$V9
-wp0$lat <- as.numeric(as.character(wp0$V8))
-wp0$id <- as.character(wp0$V2)
-wp0$alt <- as.numeric(substring(as.character(wp0$V19), 1,
- (nchar(as.character(wp0$V19))-1)))
-wp0$time <- as.POSIXct(strptime(paste(as.character(wp0$V3),
- as.character(wp0$V4)), format="\%d-\%b-\%y \%H:\%M:\%S"))
-str(wp0)
-wp1 <- wp0[,-(1:6)]
-str(wp1)
-summary(wp1)
+#b1 <- readGPS(f="usb:")
+#str(b1)
+#b2 <- b1[1:172,]
+#wp0 <- b2[,c(2,3,4,8,9,19)]
+#str(wp0)
+#wp0$long <- wp0$V9
+#wp0$lat <- as.numeric(as.character(wp0$V8))
+#wp0$id <- as.character(wp0$V2)
+#wp0$alt <- as.numeric(substring(as.character(wp0$V19), 1,
+# (nchar(as.character(wp0$V19))-1)))
+#wp0$time <- as.POSIXct(strptime(paste(as.character(wp0$V3),
+# as.character(wp0$V4)), format="\%d-\%b-\%y \%H:\%M:\%S"))
+#str(wp0)
+#wp1 <- wp0[,-(1:6)]
+#str(wp1)
+#summary(wp1)
 }
 }
 % Add one or more standard keywords, see file 'KEYWORDS' in the
diff --git a/man/readSplus.Rd b/man/readSplus.Rd
index fec37b0..1a1c4a6 100644
--- a/man/readSplus.Rd
+++ b/man/readSplus.Rd
@@ -17,7 +17,7 @@ readSplus(file, proj4string = CRS(as.character(NA)))
 \value{
   \code{readSplus} returns a SpatialPolygons object
 }
-\references{\url{http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/geobugs12manual.pdf}}
+\references{\url{http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/geobugs12manual.pdf}}
 \author{Virgilio Gomez Rubio <Virgilio.Gomez at uclm.es>}
 \note{In the example, taken from the GeoBUGS manual, the smaller part of area1 has a counter-clockwise ring direction in the data, while other rings are clockwise. This implies that it is a hole, and does not get filled. Errant holes may be filled using \code{\link{checkPolygonsHoles}}. The region labels are stored in the \code{ID} slots of the \code{Polygons} objects.}
 \seealso{\code{\link{map2SpatialPolygons}}}
diff --git a/man/sp2Mondrian.Rd b/man/sp2Mondrian.Rd
index b00479e..dff9bbb 100644
--- a/man/sp2Mondrian.Rd
+++ b/man/sp2Mondrian.Rd
@@ -16,7 +16,7 @@ sp2Mondrian(SP, file, new_format=TRUE)
 }
 
 
-\references{\url{http://rosuda.org/Mondrian/}}
+\references{\url{http://www.theusrus.de/Mondrian/}}
 \author{Patrick Hausmann and Roger Bivand}
 \note{
  At this release, the function writes out a text file with both data and polygon(s) identified as belonging to each row of data.
diff --git a/man/sp2WB.Rd b/man/sp2WB.Rd
index c81ffc8..d2b554e 100644
--- a/man/sp2WB.Rd
+++ b/man/sp2WB.Rd
@@ -18,7 +18,7 @@ sp2WB(map, filename, Xscale = 1, Yscale = Xscale, plotorder = FALSE)
   \item{plotorder}{default=FALSE, if TRUE, export polygons in plotting order}
 }
 
-\references{\url{http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/geobugs12manual.pdf}}
+\references{\url{http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/geobugs12manual.pdf}}
 \author{Virgilio Gómez Rubio, partly derived from earlier code by Thomas Jagger}
 
 
@@ -34,7 +34,7 @@ all.equal(xxx, as(xx, "SpatialPolygons"), tolerance=.Machine$double.eps^(1/4),
 \dontrun{
 x <- readAsciiGrid(system.file("grids/test.ag", package="maptools")[1])
 xp <- as(x, "SpatialPixelsDataFrame")
-pp <- as.SpatialPolygons.SpatialPixels(xp)
+pp <- as(xp, "SpatialPolygons")
 sp2WB(pp, filename="test.map")
 }
 }
diff --git a/man/sp2tmap.Rd b/man/sp2tmap.Rd
index 3a6adee..555e53a 100644
--- a/man/sp2tmap.Rd
+++ b/man/sp2tmap.Rd
@@ -29,11 +29,13 @@ xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
  IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
 plot(xx, border="blue", axes=TRUE, las=1)
 tmapdf <- sp2tmap(as(xx, "SpatialPolygons"))
+if (require(foreign)) {
 write.dta(tmapdf, file="NCmap.dta", version=7)
 NCdf <- as(xx, "data.frame")
 NCdf$ID_n <- attr(tmapdf, "ID_names")
 write.dta(NCdf, file="NC.dta", version=7)
 }
 }
+}
 \keyword{spatial}
 
diff --git a/man/symbolsInPolys.Rd b/man/symbolsInPolys.Rd
index d69ba4c..b8c69bb 100644
--- a/man/symbolsInPolys.Rd
+++ b/man/symbolsInPolys.Rd
@@ -16,7 +16,7 @@ symbolsInPolys(pl, dens, symb = "+", compatible = FALSE)
   \item{compatible}{what to return, if TRUE a a list of matrices of point coordinates, one matrix for each member of pl, with a \code{symb} attribute, if false a SpatialPointsDataFrame with a \code{symb} column}
 }
 \details{
-  The dots are placed in a grid pattern with the number of points per polygon being polygon area times density (number of dots not guaranteed to be the same as the count). When the polygon is made up of more than one part, the dots will be placed in proportion to the relative areas of the clockwise rings (anticlockwise are taken as holes). From maptools release 0.5-2, correction is made for holes in the placing of the dots, but depends on hole values being correctly set, which they often [...]
+  The dots are placed in a grid pattern with the number of points per polygon being polygon area times density (number of dots not guaranteed to be the same as the count). When the polygon is made up of more than one part, the dots will be placed in proportion to the relative areas of the clockwise rings (anticlockwise are taken as holes). From maptools release 0.5-2, correction is made for holes in the placing of the dots, but depends on hole values being correctly set, which they often [...]
 }
 
 \value{
@@ -33,7 +33,6 @@ The function returns a list of matrices of point coordinates, one matrix for eac
 nc_SP <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
  proj4string=CRS("+proj=longlat +ellps=clrk66"))
 \dontrun{
-library(spgpc)
 pls <- slot(nc_SP, "polygons")
 pls_new <- lapply(pls, checkPolygonsHoles)
 nc_SP <- SpatialPolygonsDataFrame(SpatialPolygons(pls_new,
diff --git a/man/wrld_simpl.Rd b/man/wrld_simpl.Rd
index eadee29..0a09a67 100644
--- a/man/wrld_simpl.Rd
+++ b/man/wrld_simpl.Rd
@@ -27,7 +27,7 @@ The object is in geographical coordinates using the WGS84 datum.
 }
 
 \source{
-  \url{http://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip}
+  Originally \dQuote{http://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip}, now available from \url{https://github.com/nasa/World-Wind-Java/tree/master/WorldWind/testData/shapefiles}
 }
 
 \examples{
diff --git a/src/Rgshhs.c b/src/Rgshhs.c
index c2c57bd..ba8b25e 100644
--- a/src/Rgshhs.c
+++ b/src/Rgshhs.c
@@ -1,4 +1,4 @@
-/*	$Id: Rgshhs.c 259 2013-03-30 12:53:40Z rsbivand $
+/*	$Id: Rgshhs.c 290 2015-02-03 13:57:30Z rsbivand $
  *
  *	Copyright (c) 1996-2011 by P. Wessel and W. H. F. Smith
  *	See COPYING file for copying and redistribution conditions.
@@ -83,10 +83,10 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
 {
 	FILE *fp;
 	double w, e, s, n, area, lon, lat, scale = 10.0;
-	char source;
+/*	char source;*/
 	char msg[255];
 	const char *name[2] = {"polygon", "line"};
-	int k, line, max_east = 270000000, n_read, /*flip,*/ Level, version, greenwich, src, m, river;
+	int k, line, max_east = 270000000, n_read, /*flip,*/ Level, version, greenwich, src, m/*, river*/;
 	struct POINT p;
 	struct GSHHS h;
 	int npols, pc=0;
@@ -182,13 +182,13 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
 			warning("Data not same version as software %d", version);
 		    greenwich = (h.flag >> 16) & 3;			/* Greenwich is 0-3 */
 		    src = (h.flag >> 24) & 1;			/* Greenwich is 0 (WDBII) or 1 (WVS) */
-		    river = (h.flag >> 25) & 1;			/* River is 0 (not river) or 1 (is river) */
+/*		    river = (h.flag >> 25) & 1;			 River is 0 (not river) or 1 (is river) */
 		    w = h.west  * GSHHS_SCL;	
 /* Convert from microdegrees to degrees */
 		    e = h.east  * GSHHS_SCL;
 		    s = h.south * GSHHS_SCL;
 		    n = h.north * GSHHS_SCL;
-		    source = (src == 1) ? 'W' : 'C';	/* Either WVS or CIA (WDBII) pedigree */
+/*		    source = (src == 1) ? 'W' : 'C';	 Either WVS or CIA (WDBII) pedigree */
 		    line = (h.area) ? 0 : 1;		/* Either Polygon (0) or Line (1) (if no area) */
 		    m = h.flag >> 26;
 		    scale = pow (10.0, (double)m);		/* Area scale */
diff --git a/src/pip.c b/src/pip.c
index 8c500f3..b1fef11 100644
--- a/src/pip.c
+++ b/src/pip.c
@@ -1,10 +1,6 @@
 /* Copyright where not otherwise stated Edzer Pebesma 2004, 
 copied from sp package */
 
-#define USING_R 1
-#include "S.h" 
-
-#ifdef USING_R
 # include <R.h>
 # include <Rdefines.h>
 /* # include <Rinternals.h> */
@@ -12,20 +8,6 @@ copied from sp package */
 # define R_NORMAL  norm_rand()
 # define RANDIN seed_in((long *) NULL)
 # define RANDOUT seed_out((long *) NULL)
-# define S_EVALUATOR
-#else /* some S-Plus version; assuming >= 6 for now: */
-# if (!defined(SPLUS_VERSION) || SPLUS_VERSION < 6000)
-#  error("no SPLUS_VERSION >= 6.0")
-# endif
-# define SEXP s_object *
-# define PROTECT(x) x
-# define UNPROTECT(x)
-# define R_UNIFORM unif_rand(S_evaluator)
-# define R_NORMAL  norm_rand(S_evaluator)
-# define RANDIN seed_in((long *) NULL, S_evaluator)
-# define RANDOUT seed_out((long *) NULL, S_evaluator)
-# define Rprintf printf
-#endif
 
 #ifndef MIN
 # define MIN(a,b) ((a)>(b)?(b):(a))
@@ -59,7 +41,6 @@ SEXP R_point_in_polygon_mt(SEXP px, SEXP py, SEXP polx, SEXP poly) {
 	POLYGON pol;
 	SEXP ret;
 
-	S_EVALUATOR
 	pol.lines = LENGTH(polx); /* check later that first == last */
 	pol.p = (PLOT_POINT *) Calloc(pol.lines, PLOT_POINT); /* Calloc does error handling */
 	for (i = 0; i < LENGTH(polx); i++) {
diff --git a/src/shapefil.h b/src/shapefil.h
index 7b24637..8593ad5 100644
--- a/src/shapefil.h
+++ b/src/shapefil.h
@@ -2,7 +2,7 @@
 #define _SHAPEFILE_H_INCLUDED
 
 /******************************************************************************
- * $Id: shapefil.h 259 2013-03-30 12:53:40Z rsbivand $
+ * $Id: shapefil.h 290 2015-02-03 13:57:30Z rsbivand $
  *
  * Project:  Shapelib
  * Purpose:  Primary include file for Shapelib.
@@ -209,12 +209,12 @@ extern "C" {
 /*      Macros for controlling CVSID and ensuring they don't appear     */
 /*      as unreferenced variables resulting in lots of warnings.        */
 /* -------------------------------------------------------------------- */
-//#ifndef DISABLE_CVSID
-//#  define SHP_CVSID(string)     static char cpl_cvsid[] = string; \
-//static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : cpl_cvsid ); }
-//#else
-//#  define SHP_CVSID(string)
-//#endif
+/*#ifndef DISABLE_CVSID
+#  define SHP_CVSID(string)     static char cpl_cvsid[] = string; \
+static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : cpl_cvsid ); }
+#else
+#  define SHP_CVSID(string)
+#endif*/
 
 /************************************************************************/
 /*                             SHP Support.                             */
diff --git a/vignettes/combine_maptools.Rnw b/vignettes/combine_maptools.Rnw
index a4ac4b1..d9e8f2a 100644
--- a/vignettes/combine_maptools.Rnw
+++ b/vignettes/combine_maptools.Rnw
@@ -169,11 +169,11 @@ into difficulties:
 <<echo=TRUE,keep.source=FALSE>>= 
 names(nc90)
 @
-<<echo=TRUE,eval=FALSE,keep.source=FALSE>>= 
+<<echo=TRUE,eval=FALSE,keep.source=FALSE,results=hide>>= 
 nc90a <- spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep=""))
 @
 <<echo=FALSE,eval=TRUE,results=hide>>= 
-try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")))
+try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")), silent=TRUE)
 @
 <<eval=TRUE,echo=FALSE>>= 
 cat(try1)

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



More information about the debian-science-commits mailing list