[r-cran-maptools] 13/20: Import Upstream version 0.8-30
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 8d98679ca70c755bec40e19c2f390acce795e4a5
Author: Andreas Tille <tille at debian.org>
Date: Sun Jan 15 19:53:28 2017 +0100
Import Upstream version 0.8-30
---
ChangeLog | 836 +++++++++++-----
DESCRIPTION | 107 ++-
MD5 | 99 +-
NAMESPACE | 7 +-
R/AAA.R | 7 +-
R/Rgshhs.R | 5 +-
R/SP2owin.R | 2 +-
R/Spatial-methods.R | 4 +-
R/SpatialLines-methods.R | 1 +
R/SpatialPoints-methods.R | 1 +
R/SpatialPolys-methods.R | 2 +-
R/checkHoles.R | 3 +-
R/elide.R | 0
R/gc_dist.R | 0
R/kmlLine.R | 0
R/kmlLines.R | 100 ++
R/kmlPolygon.R | 0
R/kmlPolygons.R | 119 +++
R/maptools.R | 2 +-
R/nowrapRecenter.R | 4 +-
R/point_line_distance.R | 21 +-
R/sp_spat1.R | 6 +-
R/union.R | 2 +-
build/vignette.rds | Bin 0 -> 224 bytes
data/wrld_simpl.rda | Bin 283324 -> 0 bytes
inst/ChangeLog | 836 +++++++++++-----
inst/LICENSE | 99 --
LICENSE => inst/README | 0
inst/doc/combine_maptools.R | 249 +++++
inst/doc/combine_maptools.Rnw | 431 +++++++++
inst/doc/combine_maptools.pdf | Bin 0 -> 451410 bytes
inst/shapes/baltim.dbf | Bin 31595 -> 0 bytes
inst/shapes/baltim.shp | Bin 6008 -> 0 bytes
inst/shapes/baltim.shx | Bin 1788 -> 0 bytes
inst/shapes/co37_d90.dbf | Bin 0 -> 11906 bytes
inst/shapes/co37_d90.shp | Bin 0 -> 168516 bytes
inst/shapes/co37_d90.shx | Bin 0 -> 932 bytes
inst/shapes/co45_d90.dbf | Bin 0 -> 5410 bytes
inst/shapes/co45_d90.shp | Bin 0 -> 128708 bytes
inst/shapes/co45_d90.shx | Bin 0 -> 468 bytes
inst/shapes/co51_d90.dbf | Bin 0 -> 15490 bytes
inst/shapes/co51_d90.shp | Bin 0 -> 218264 bytes
inst/shapes/co51_d90.shx | Bin 0 -> 1188 bytes
inst/shapes/columbus.dbf | Bin 10082 -> 0 bytes
inst/shapes/columbus.shp | Bin 21980 -> 0 bytes
inst/shapes/columbus.shx | Bin 492 -> 0 bytes
inst/shapes/pointZ.dbf | Bin 38593 -> 0 bytes
inst/shapes/pointZ.prj | 1 -
inst/shapes/pointZ.shp | Bin 17700 -> 0 bytes
inst/shapes/pointZ.shx | Bin 3300 -> 0 bytes
inst/shapes/sids.dbf | Bin 17282 -> 0 bytes
inst/shapes/sids.shp | Bin 46196 -> 0 bytes
inst/shapes/sids.shx | Bin 900 -> 0 bytes
inst/share/90mfips.txt | 2053 ++++++++++++++++++++++++++++++++++++++++
inst/share/gshhs_c.b | Bin 182584 -> 182716 bytes
inst/share/wdb_borders_c.b | Bin 85144 -> 85144 bytes
man/CCmaps.Rd | 5 +-
man/Rgshhs.Rd | 9 +-
man/checkPolygonsHoles.Rd | 3 +-
man/elide-methods.Rd | 0
man/gcDestination.Rd | 0
man/kmlLines.Rd | 62 ++
man/kmlPoints.Rd | 6 +-
man/kmlPolygon.Rd | 0
man/kmlPolygons.Rd | 83 ++
man/map2SpatialPolygons.Rd | 4 +-
man/nowrapRecenter.Rd | 3 +-
man/pointLabelLattice.Rd | 2 +-
man/readSplus.Rd | 2 +
man/snapPointsToLines.Rd | 9 +-
man/spCbind-methods.Rd | 1 +
man/sun-methods.Rd | 2 +
man/unionSpatialPolygons.Rd | 3 +-
maptools-Ex.R | 1654 --------------------------------
src/Rcentroid.c | 2 +-
src/Rgshhs.c | 20 +-
src/Rshapewrite1.c | 30 +-
src/insiders.c | 2 +-
src/shapefil.h | 14 +-
src/shpopen.c | 94 +-
src/shptree.c | 46 +-
vignettes/combine_maptools.Rnw | 431 +++++++++
82 files changed, 4995 insertions(+), 2489 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 645949f..f08d56a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,320 +1,523 @@
+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
+
+2014-01-28 19:02 rsbivand
+
+ * 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
+
+2013-09-01 18:06 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-30 11:38 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-30 11:37 rsbivand
+
+ * .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 :::
+
+2013-08-07 11:17 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-07 11:15 rsbivand
+
+ * DESCRIPTION,
+ NAMESPACE, man/pointLabelLattice.Rd, man/spCbind-methods.Rd:
+ depends -> imports
+
+2013-07-02 19:01 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-07-02 19:01 rsbivand
+
+ * inst/LICENSE,
+ inst/README: tidy
+
+2013-07-02 18:00 rsbivand
+
+ * DESCRIPTION:
+ tidy
+
+2013-07-02 17:56 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-07-02 17:48 rsbivand
+
+ * DESCRIPTION:
+ tidy
+
+2013-06-27 20:50 edzer
+
+ * 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
+
+2013-06-25 17:11 rsbivand
+
+ * vignettes/combine_maptools.Rnw,
+ vignettes/combine_maptools.pdf: adding footnote
+
+2013-06-21 12:52 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-06-21 12:50 rsbivand
+
+ * 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
+
+2013-06-20 18:16 rsbivand
+
+ * 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,
+ inst/shapes/co51_d90.dbf, inst/shapes/co51_d90.shp,
+ inst/shapes/co51_d90.shx, inst/share/90mfips.txt,
+ man/kmlLines.Rd, man/kmlPolygons.Rd, vignettes,
+ vignettes/combine_maptools.Rnw, vignettes/combine_maptools.pdf:
+ adding vignette, kml functions
+
+2013-03-30 12:53 rsbivand
+
+ * 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
+
+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
+
+2013-02-10 14:00 rsbivand
+
+ * 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,
@@ -323,93 +526,109 @@
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,
@@ -417,48 +636,58 @@
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
@@ -466,131 +695,163 @@
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
@@ -598,23 +859,28 @@
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
@@ -626,23 +892,28 @@
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
@@ -658,7 +929,8 @@
2008-04-13 16:47 rsbivand
- * PBS to SP SID bug
+ * PBS
+ to SP SID bug
2008-04-10 14:07 rsbivand
@@ -666,15 +938,18 @@
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
@@ -682,43 +957,53 @@
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
@@ -726,15 +1011,18 @@
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
@@ -742,11 +1030,13 @@
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
@@ -758,19 +1048,23 @@
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
@@ -778,23 +1072,28 @@
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
@@ -810,11 +1109,13 @@
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
@@ -822,23 +1123,28 @@
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
@@ -850,27 +1156,33 @@
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
@@ -886,31 +1198,38 @@
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
@@ -922,11 +1241,13 @@
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
@@ -938,7 +1259,8 @@
2006-03-01 08:53 rsbivand
- * checks on polylists
+ * checks
+ on polylists
2006-01-11 11:08 rsbivand
@@ -954,15 +1276,18 @@
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
@@ -970,27 +1295,33 @@
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
@@ -1002,21 +1333,26 @@
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 f74a377..f801c2f 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,54 +1,73 @@
Package: maptools
-Version: 0.8-23
-Date: 2013-02-09
+Version: 0.8-30
+Date: 2014-06-05
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("Hans-Jörg", "Bibiko", role =
- "ctb"), person("Jonathan", "Callahan", role = "ctb"),
- person("German", "Carrillo", role = "ctb"), person("Stéphane",
- "Dray", role = "ctb"), person("David", "Forrest", role =
- "ctb"), person("Michael", "Friendly", role = "ctb"),
- person("Patrick", "Giraudoux", role = "ctb"), person("Duncan",
- "Golicher", role = "ctb"), person("Virgilio", "Gómez Rubio",
- role = "ctb"), person("Patrick", "Hausmann", role = "ctb"),
- person("Karl Ove", "Hufthammer", role = "ctb"),
- person("Thomas", "Jagger", role = "ctb"), person("Sebastian",
- "Luque", role = "ctb"), person("Don", "MacQueen", role =
- "ctb"), person("Andrew", "Niccolai", role = "ctb"),
- person("Oscar", "Perpiñán Lamigueiro", role = "ctb"),
- person("Tom", "Short", role = "ctb"), person("Greg", "Snow",
- role = "ctb"), person("Ben", "Stabler", role = "ctb"),
- person("Murray", "Stokely", role = "ctb"), person("Rolf",
- "Turner", role = "ctb"))
+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("Hans-Jörg", "Bibiko", role = "ctb"),
+ person("Steven", "Brey", role = "ctb"),
+ person("Jonathan", "Callahan", role = "ctb"),
+ person("German", "Carrillo", role = "ctb"),
+ person("Stéphane", "Dray", role = "ctb"),
+ person("David", "Forrest", role = "ctb"),
+ person("Michael", "Friendly", role = "ctb"),
+ person("Patrick", "Giraudoux", role = "ctb"),
+ person("Duncan", "Golicher", role = "ctb"),
+ person("Virgilio", "Gómez Rubio", role = "ctb"),
+ person("Patrick", "Hausmann", role = "ctb"),
+ person("Karl Ove", "Hufthammer", role = "ctb"),
+ person("Thomas", "Jagger", role = "ctb"),
+ person("Sebastian", "Luque", role = "ctb"),
+ person("Don", "MacQueen", role = "ctb"),
+ person("Andrew", "Niccolai", role = "ctb"),
+ person("Oscar", "Perpiñán Lamigueiro", role = "ctb"),
+ person("Tom", "Short", role = "ctb"),
+ person("Greg", "Snow", role = "ctb"),
+ person("Ben", "Stabler", role = "ctb"),
+ person("Murray", "Stokely", role = "ctb"),
+ person("Rolf", "Turner", role = "ctb"))
Encoding: UTF-8
-Depends: R (>= 2.10), foreign (>= 0.8), sp (>= 0.9-47), methods, grid,
- lattice, stats
+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
-Description: Set of tools for manipulating and reading geographic data,
- in particular ESRI shapefiles; C code used from shapelib. It
- includes binary access to GSHHS 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.
+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: 2013-02-10 14:01:59 UTC; rsb
-Author: Roger Bivand [cre, aut], Nicholas Lewin-Koh [aut], Edzer
- Pebesma [ctb], Eric Archer [ctb], Adrian Baddeley [ctb],
- Hans-Jörg Bibiko [ctb], Jonathan Callahan [ctb], German
- Carrillo [ctb], Stéphane Dray [ctb], David Forrest [ctb],
- Michael Friendly [ctb], Patrick Giraudoux [ctb], Duncan
- Golicher [ctb], Virgilio Gómez Rubio [ctb], Patrick Hausmann
- [ctb], Karl Ove Hufthammer [ctb], Thomas Jagger [ctb],
- Sebastian Luque [ctb], Don MacQueen [ctb], Andrew Niccolai
- [ctb], Oscar Perpiñán Lamigueiro [ctb], Tom Short [ctb], Greg
- Snow [ctb], Ben Stabler [ctb], Murray Stokely [ctb], Rolf
- Turner [ctb]
+Packaged: 2014-06-05 18:02:47 UTC; rsb
+Author: Roger Bivand [cre, aut],
+ Nicholas Lewin-Koh [aut],
+ Edzer Pebesma [ctb],
+ Eric Archer [ctb],
+ Adrian Baddeley [ctb],
+ Hans-Jörg Bibiko [ctb],
+ Steven Brey [ctb],
+ Jonathan Callahan [ctb],
+ German Carrillo [ctb],
+ Stéphane Dray [ctb],
+ David Forrest [ctb],
+ Michael Friendly [ctb],
+ Patrick Giraudoux [ctb],
+ Duncan Golicher [ctb],
+ Virgilio Gómez Rubio [ctb],
+ Patrick Hausmann [ctb],
+ Karl Ove Hufthammer [ctb],
+ Thomas Jagger [ctb],
+ Sebastian Luque [ctb],
+ Don MacQueen [ctb],
+ Andrew Niccolai [ctb],
+ Oscar Perpiñán Lamigueiro [ctb],
+ Tom Short [ctb],
+ Greg Snow [ctb],
+ Ben Stabler [ctb],
+ Murray Stokely [ctb],
+ Rolf Turner [ctb]
Maintainer: Roger Bivand <Roger.Bivand at nhh.no>
+NeedsCompilation: yes
Repository: CRAN
-Date/Publication: 2013-02-10 15:42:31
+Date/Publication: 2014-06-05 21:54:33
diff --git a/MD5 b/MD5
index aa5333c..ff5810b 100644
--- a/MD5
+++ b/MD5
@@ -1,39 +1,40 @@
-deb3cd5576beffe473ad275db90eef0f *ChangeLog
-45fbef7199362cd0a12770414fbb4690 *DESCRIPTION
-f36f02b8e559e17e5d2e56210d8f8358 *LICENSE
-1fc46cd37ec81684e1c131b0b4722989 *NAMESPACE
-f3bbe96042fd513db79b9efe6f132187 *R/AAA.R
+274498bda34adbc7317c5946b272cac1 *ChangeLog
+cdc8499b2e114513bb7527419f59a53c *DESCRIPTION
+40c3f2d138443e62202410f87d47f232 *NAMESPACE
+c7584403c09826f9a2f952d28541b2ec *R/AAA.R
1399d0064b46e6e6c90600b1b64a5e19 *R/CCmaps.R
5848792717e41318276dbe13f75315b7 *R/DP.R
b52e6bfd6272c6c26bec32d86332d830 *R/GE_png.R
-80b66cc8d070d4f7965b2eb0758f796d *R/Rgshhs.R
-929f90890eb062dd5b6038dd260c5af5 *R/SP2owin.R
-49cf181c899841812a2bb22c6ab79d36 *R/Spatial-methods.R
-a64d500aa81262fb0252d4b3aa1f7662 *R/SpatialLines-methods.R
-671d16e8dd8547271c36604b7fb7d97c *R/SpatialPoints-methods.R
-67df860fd2684398c6a29f53c1e1eb76 *R/SpatialPolys-methods.R
+0dcb5d38c0129ccb89508ca919297264 *R/Rgshhs.R
+e2a4c50e82b203053bdc6ca6fdefccfb *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
-c7ec880c721a64b9ffa9731f12d43f1d *R/checkHoles.R
+2e6d402918e27b9ef5ca2c08311fb155 *R/checkHoles.R
26a3fc11f1fca539879d3f115d2b444b *R/colslegs.R
0aeb9b76c865d15b173bdb5ac052692a *R/dotsinpolys.R
08fee92d40b987ffe9af7c4ec17c58ad *R/elide.R
148df8cfbd7dadceba256df8d37d9ab0 *R/gc_dist.R
a9f9233e0515d09b17d77d785f4d0312 *R/getKMLcoordinates.R
3a28225f27e2c7a6531411d4fe27ac7f *R/kmlLine.R
+2d3ab1aba7162799d44681126d595d1a *R/kmlLines.R
4f0724c5f0fd055529d99e1f3798bec3 *R/kmlPoints.R
7686ded0d450e1b142ae99628284c1c9 *R/kmlPolygon.R
+f12f43e39b656317955dbef67381ce5e *R/kmlPolygons.R
b5aec75cdeab2607fc41d781cb80f1ca *R/lineLabel.R
-2af1dab97074d7202daee3f95d971191 *R/maptools.R
+eeb395e7f576fca09fce5ad04b92c0d7 *R/maptools.R
e32451be693afaa6914ccb3a414ef9d2 *R/maptoolsChanges.R
dec461da52968b8289e55fc84925c5fd *R/midpoint.R
-98c47f3636741a33836988bfdde7188d *R/nowrapRecenter.R
+a766faa83e4ba7829a28b035bc7ea524 *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
-8fa9f1f35d55c471b3c070e713ff14ab *R/point_line_distance.R
+a0dc5cb12ae9c727fa509b77569654ad *R/point_line_distance.R
3ea318f87d9fbe32693557d502f7dcee *R/readGPS.R
4ce28933f9aaee54b7c0e2d718b2a2e5 *R/readSplus.R
254297162508942d87ed1f7f0dd64a85 *R/shapelib.R
@@ -42,27 +43,40 @@ b1733b14cbc627504bd3564e87b6213b *R/point.in.polygon.R
30ae94c4a694f983c4b710aaa80e4636 *R/sp2pbs.R
293eab37398f4ea65b421b8091bd569e *R/sp2tmap.R
1f59cf510bc07e7029d3161ec42b5de4 *R/sp_bind.R
-c9daa9fe1ac96fa85e2bcb86758d8f5c *R/sp_spat1.R
+c3f8575c811e1aaf0fe6380379209479 *R/sp_spat1.R
e9943f26d6c56f3ba69d60ba6652e9e4 *R/sp_tools.R
a1f3e3ac4a74a5e2848a5aa706c84d71 *R/spatstat1.R
51749751c1f05788c2dda6369e19a203 *R/spmaps.R
beb695c582d1c3aaa519cedd375e2c38 *R/subset.R
4d3c2cab1f163eacf26bfd66161f0440 *R/sun-methods.R
7149e328828e259e39b14f0a2bdf5c1b *R/sun.R
-9181ef13c0ad5e9830801464afb9ba33 *R/union.R
+0bf04c1d531f8b4a5eb4493b5b926838 *R/union.R
89e84c8fec40a5e2d0482ae8642a5244 *R/zzz.R
+a108b7622d61cdbf91a14fd6f812cb9c *build/vignette.rds
d0b8c2ac5cb2ac40fff68a7b329df381 *data/SplashDams.rda
ad794d2bb004f79c29d6d20a9341a0ec *data/gpcholes.rda
f58d7bbadb55463c773ef91b74f7e6cf *data/state.vbm.rda
b11b2dc736e768c927211d6fce5ab7df *data/wrld_simpl.rda
-deb3cd5576beffe473ad275db90eef0f *inst/ChangeLog
-f36f02b8e559e17e5d2e56210d8f8358 *inst/LICENSE
+274498bda34adbc7317c5946b272cac1 *inst/ChangeLog
+f36f02b8e559e17e5d2e56210d8f8358 *inst/README
0d1e185186bdb70959760c0a63f7be4f *inst/changes
+7b72d500d880be91bd3507a91ea2265f *inst/doc/combine_maptools.R
+541f7be428b60c34f0201f3d99fe13a7 *inst/doc/combine_maptools.Rnw
+7145e9094b018948b407aaafe0bae241 *inst/doc/combine_maptools.pdf
ef247b6c335e75e48f81da7ef7554fa6 *inst/grids/simple.ag
15c2101eb916ea116f400d560f73dd7c *inst/grids/test.ag
be9a3966e14428c7c83c6a0fa745baaa *inst/shapes/baltim.dbf
8ed6c81148522bb43464e0ea30489099 *inst/shapes/baltim.shp
7f69b41aa1254188cd450efaaf4f6b8c *inst/shapes/baltim.shx
+364560103f4674351926cd29f7fa0f86 *inst/shapes/co37_d90.dbf
+5569af91183e0432dc5b47ac5fd4a854 *inst/shapes/co37_d90.shp
+db7bb5c3f95c8e0334d43766fa2b1e87 *inst/shapes/co37_d90.shx
+6adb9c3a4834de20b23c25954be18d9c *inst/shapes/co45_d90.dbf
+44bf69b3657f51c26ecebabc436758ff *inst/shapes/co45_d90.shp
+60529d15efed38ce01cdeff303585280 *inst/shapes/co45_d90.shx
+b646fb8cdd18952ae21f40dcdc5f1e61 *inst/shapes/co51_d90.dbf
+bb27f9ceffd3abaa8fe0a8bfaada4f50 *inst/shapes/co51_d90.shp
+fdaf3d2e2789a615e741f0eee53a4c3a *inst/shapes/co51_d90.shx
a692f891aa504c8092a824e37f236475 *inst/shapes/columbus.dbf
f5952cc1485ac06b60d6554664becf65 *inst/shapes/columbus.shp
f55a38e1ffb1605a7895df9e790d24f0 *inst/shapes/columbus.shx
@@ -79,21 +93,22 @@ f42287ef344d1258b3b6268be060d0b4 *inst/shapes/pointZ.prj
739845e11f7e69826b04ca22a7d45568 *inst/shapes/sids.dbf
32ef63f29fdb9eca9733dc5feb3a707d *inst/shapes/sids.shp
2085b2c4715f1f58c64bc410166371fd *inst/shapes/sids.shx
+690ddec006726aa3026ce74bfd7e3e5a *inst/share/90mfips.txt
c4f746f01e9671f40b124ffdcd47fca8 *inst/share/Splus.map
29005b74a5acf1caac4aca8807a46933 *inst/share/co37_d90.e00
-542df698239a73e33ac7deb278089326 *inst/share/gshhs_c.b
+ee1a63687548996dd74f7d107a3d2183 *inst/share/gshhs_c.b
e3fb11232e6cb27770d15aaf4f632aa4 *inst/share/nc_xtra.dbf
-f6f195d5493396e97599ec596bd61b4c *inst/share/wdb_borders_c.b
-01780bffb2997b97141feb87540a3516 *man/CCmaps.Rd
+e0cca3b24f2b8a921921a81d7f883e30 *inst/share/wdb_borders_c.b
+fee837a72aedce6b5c90966fd5e45f30 *man/CCmaps.Rd
f85df7425d7f27dfc69832b69edd86f2 *man/ContourLines2SLDF.Rd
5ad9bfb6296b6c8488c7d8644a3c1de1 *man/GE_SpatialGrid.Rd
-72db9fc93d5daea7ab2a7ebf77a314be *man/Rgshhs.Rd
+42b00d72e43c99e5fd62fdcd27948918 *man/Rgshhs.Rd
9c8d32a1a4db3e63600de7b91d0cff44 *man/SpatialLines2PolySet.Rd
94cade77d4574f0150a68af47e86ca01 *man/SpatialLinesMidPoints.Rd
5dd0471f34d8645c1a41916a4f7b6a31 *man/SplashDams.Rd
f7e0c617483ff82aaa7436adf262d586 *man/as.ppp.Rd
c67196d773b35e38abc31670b5481096 *man/asciigrid.Rd
-e4e87a89e1cc56a586d68960ba5bc4a1 *man/checkPolygonsHoles.Rd
+16636a542afe049937d1ee35ce705ed6 *man/checkPolygonsHoles.Rd
0ba43dbf573ef51669d7ad2922a1af3c *man/dotsInPolys.Rd
9e39e06ce97aa7407879a00def515fc7 *man/elide-methods.Rd
950743858326fd33e6c180a315cde063 *man/gcDestination.Rd
@@ -102,48 +117,50 @@ e455cbefaf6d3970b24081a7c02d8fa3 *man/getinfo.shape.Rd
96c5eb42c51c44dfc1ce301a3df4347b *man/gzAzimuth.Rd
5fa1da9264c3fcb8c7936e23b2514180 *man/holepolys.Rd
8b8ecf1e0a835f24842c838b2ada0d91 *man/kmlLine.Rd
+762152ce9ff1877169657109aff34a30 *man/kmlLines.Rd
21b39cbcb1d236065117a19ed9a320a9 *man/kmlOverlay.Rd
-6a8926d8c881588f4c7907711591c0cc *man/kmlPoints.Rd
+9291418666f9c921df9e463e56e0ac0c *man/kmlPoints.Rd
795ee68785451f2fc7623bcd003a43fd *man/kmlPolygon.Rd
+2f59365e555612d1f0c6cbfee8b29229 *man/kmlPolygons.Rd
5aee594b0203b637510fe71e1ce2bda3 *man/leglabs.Rd
c5f20bfb6b29271ed4868200d37d5b95 *man/lineLabel.Rd
-fc945c4eb6e1d7ad5e6c57671285a4c9 *man/map2SpatialPolygons.Rd
+5a4a4b9e30c33f6fda7562f9139d6c84 *man/map2SpatialPolygons.Rd
faeaff841d01f23c46e359dcac2f95e0 *man/nearestPointOnLine.Rd
4c4dfe73ec4e6c87be454a6f0cb53f0a *man/nearestPointOnSegment.Rd
-a5aa4380a95ebdc5511aa3c082cbc848 *man/nowrapRecenter.Rd
+371eb0566fdd1a72bf58d5eff400f1b9 *man/nowrapRecenter.Rd
e941e4c0fe856263cca3eeafd3a81c09 *man/pal2SpatialPolygons.Rd
2192d5eded3e8cea9af4c39a6c90fb50 *man/pointLabelBase.Rd
-cafc82b341c3fa708b3c92f37881b6e9 *man/pointLabelLattice.Rd
+742213470de35c3663880b6e44dc6479 *man/pointLabelLattice.Rd
e54eef37d626acea8c6350db5fe2219d *man/ppp.Rd
1d23bfed4495b2ed9526fe9d81b31b67 *man/readGPS.Rd
5a5a29a3a575bb8b499954e53a7ee819 *man/readShapeLines.Rd
e0c09bc46d251ecac95df41134b868ed *man/readShapePoints.Rd
c4854a1684e89709b27f5335a05ece11 *man/readShapePoly.Rd
ac2a0d238e65e9587660a0df4796fe9f *man/readShapeSpatial.Rd
-69007bb88fcfc1df500197b01f5b23fa *man/readSplus.Rd
-767c435212b466210e75bd07de3c889d *man/snapPointsToLines.Rd
+3fd81944327fef01bf9dd9592b69ab42 *man/readSplus.Rd
+34aaa76f9b59b6c4ca112bdd7fd0b3e8 *man/snapPointsToLines.Rd
c8a374183fc3f7fb622485c5b7f36938 *man/sp2Mondrian.Rd
20f2d2c2d1c070d7b2fefc9e1556cc5a *man/sp2WB.Rd
5b5be2484b2a7bb15e6e4eaddc60c621 *man/sp2tmap.Rd
-ace8a20344f545f9e0faa30f8e7de2e9 *man/spCbind-methods.Rd
+8cd390f284ba7ccab043de264d9cd2cc *man/spCbind-methods.Rd
38877ece5e77bf053bc5cc2031c7c2ad *man/spRbind-methods.Rd
024209da5ee31a795eaa70cafa7743f8 *man/state.vbm.Rd
-0b0b2a46375b6c9e16f50e5046573092 *man/sun-methods.Rd
+416aa7a72cba7c81039f7bf299d7684a *man/sun-methods.Rd
82b7bf65f37a77094bc0eece339d5a67 *man/symbolsInPolys.Rd
71a1b2f0e6652e19f21cc60fdf44d235 *man/thinnedSpatialPoly.Rd
-f7e8eda586323e58757d488d0aceb282 *man/unionSpatialPolygons.Rd
+60b736f9f720031b6500d961a7e52d3a *man/unionSpatialPolygons.Rd
07568c79ba78dfd739f910d93048aa07 *man/wrld_simpl.Rd
-81158e2282656234a0e579acd9b6bff6 *maptools-Ex.R
-1bf1a0abc70257b5b43e39184b67187a *src/Rcentroid.c
-66d2929d6a58ae93974ff266cfeb23ba *src/Rgshhs.c
+a93e5376f63cad9adb25e730dde1a507 *src/Rcentroid.c
+0488948734e012df8d08f0ef4fb40d4d *src/Rgshhs.c
9509debecc4e83e39be501a04c003f11 *src/Rgshhs.h
1124203648658a3692a1192c8c8891d7 *src/Rshapeget.c
496830d11d266228fbf847eaab8abcad *src/Rshapeinfo.c
154bc3269659778e5562b39fadc4a80f *src/Rshapewrite.c
-6d977f2d6b13d70d08789c544e4db90e *src/Rshapewrite1.c
-e73d96058ef7d9c6732a623eb41f9cb3 *src/insiders.c
+a9508ad124e53a1f817a63d531161727 *src/Rshapewrite1.c
+c383e3e31bd88ca270cbe9eaf7c24f21 *src/insiders.c
b44b2e8ded1a882d916425b5707186cc *src/maptools.h
bbf80b23dc8a7c63da8d19faab5ee5fc *src/pip.c
-78350ce87574efc8c1a4c6a656f2a00d *src/shapefil.h
-0615c74261af16a4ae701f4043546bdf *src/shpopen.c
-5562d9d1068a3d2c54655f1226764b64 *src/shptree.c
+8fd84193665f90476d13388bb659e73c *src/shapefil.h
+67515ce4dccb71bedbd909c6ced064aa *src/shpopen.c
+5d1ad4fd5a7cc9749b0d56c1212efe40 *src/shptree.c
+541f7be428b60c34f0201f3d99fe13a7 *vignettes/combine_maptools.Rnw
diff --git a/NAMESPACE b/NAMESPACE
index 45a6fd1..b463213 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -3,8 +3,9 @@ useDynLib(maptools)
import(sp)
import(foreign)
import(grid)
-importFrom(lattice, strip.custom)
+importFrom(lattice, strip.custom, trellis.grobname, trellis.par.get, llines)
importFrom(stats, smooth.spline)
+import(methods)
export(leglabs, dotsInPolys, symbolsInPolys, getinfo.shape, print.shapehead)
# plotpolys, shape2poly, shape2lines,
@@ -30,7 +31,7 @@ export(gzAzimuth, trackAzimuth)
export(MapGen2SL, ArcObj2SLDF, ContourLines2SLDF, pal2SpatialPolygons)
-exportClass(ppp, im, owin, psp)
+#exportClass(ppp, im, owin, psp)
exportMethods("crepuscule", "sunriset", "solarnoon", "solarpos")
@@ -55,7 +56,7 @@ exportMethods(elide)
export(GE_SpatialGrid, kmlOverlay, Sobj_SpatialGrid)
-export(kmlPolygon, kmlLine, getKMLcoordinates, kmlPoints)
+export(kmlPolygons, kmlLines, kmlPolygon, kmlLine, getKMLcoordinates, kmlPoints)
export(pointLabel, gcDestination)
export(thinnedSpatialPoly)
diff --git a/R/AAA.R b/R/AAA.R
index 28c4945..7b4a189 100644
--- a/R/AAA.R
+++ b/R/AAA.R
@@ -1,10 +1,11 @@
.MAPTOOLS_CACHE <- new.env(FALSE, parent=globalenv())
-.onLoad <- function(lib, pkg) {
- assign("gpclib", FALSE, envir=.MAPTOOLS_CACHE)
-}
+#.onLoad <- function(lib, pkg) {
+# assign("gpclib", FALSE, envir=.MAPTOOLS_CACHE)
+#}
.onAttach <- function(lib, pkg) {
+ assign("gpclib", FALSE, envir=.MAPTOOLS_CACHE)
Smess <- paste("Checking rgeos availability: ")
rgeosI <- setRgeosStatus()
Smess <- paste(Smess, rgeosI, "\n", sep="")
diff --git a/R/Rgshhs.R b/R/Rgshhs.R
index b201063..25d8062 100644
--- a/R/Rgshhs.R
+++ b/R/Rgshhs.R
@@ -100,7 +100,7 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
for (i in seq(along=polys)) {
if (clip[i] == 1) {
tp <- as(polys[[i]], "gpc.poly")
- rp <- gpclib:::intersect(tp, limgp)
+ rp <- gpclib::intersect(tp, limgp)
l <- length(rp at pts)
if (l > 0) {
outl <- vector(mode="list", length=l)
@@ -250,7 +250,7 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
}
}
for (j in 1:length(l_1)) {
- tp <- gpclib:::intersect(l_1[[j]], lp1)
+ tp <- gpclib::intersect(l_1[[j]], lp1)
if (length(tp at pts) > 0L) {
belongs[w_il[i], (il-1)] <- w_il_1[j]
if (!first_time) {
@@ -278,7 +278,6 @@ Rgshhs <- function(fn, xlim=NULL, ylim=NULL, level=4, minarea=0,
reg <- match(IDs, IDss)
new_belongs <- lapply(1:n, function(x) which(x == reg))
Srl <- vector(mode="list", length=n)
- require("sp")
for (i in 1:n) {
nParts <- length(new_belongs[[i]])
srl <- NULL
diff --git a/R/SP2owin.R b/R/SP2owin.R
index f890099..749435d 100644
--- a/R/SP2owin.R
+++ b/R/SP2owin.R
@@ -19,7 +19,7 @@
for (j in 1:nParts[i]) {
crds <- slot(pl[[j]], "coords")
colnames(crds) <- c("x", "y")
- rD <- sp:::.spFindCG(crds)$rD
+ rD <- slot(pl[[j]], "ringDir") # sp:::.spFindCG(crds)$rD
hole <- slot(pl[[j]], "hole")
if (rD == -1 && hole) crds <- crds[nrow(crds):1,]
diff --git a/R/Spatial-methods.R b/R/Spatial-methods.R
index 9e15d1c..910406c 100644
--- a/R/Spatial-methods.R
+++ b/R/Spatial-methods.R
@@ -35,5 +35,7 @@ writeSpatialShape <- function(x, fn, factor2char = TRUE, max_nchar=254) {
} else if (is(x, "SpatialPointsDataFrame")) {
writePointsShape(x=x, fn=fn, factor2char=factor2char,
max_nchar=max_nchar)
- }
+ } else {
+ stop("x is a", class(x), "object, not a compatible Spatial*DataFrame")
+ }
}
diff --git a/R/SpatialLines-methods.R b/R/SpatialLines-methods.R
index 2bf1dd7..687de28 100644
--- a/R/SpatialLines-methods.R
+++ b/R/SpatialLines-methods.R
@@ -7,6 +7,7 @@ readShapeLines <- function(fn, proj4string=CRS(as.character(NA)),
}
writeLinesShape <- function(x, fn, factor2char = TRUE, max_nchar=254) {
+ stopifnot(is(x, "SpatialLinesDataFrame"))
df <- as(x, "data.frame")
df <- data.frame(SL_ID=I(row.names(df)), df)
pls <- .SpL2lineslist(as(x, "SpatialLines"))
diff --git a/R/SpatialPoints-methods.R b/R/SpatialPoints-methods.R
index 355b2f9..41d2ece 100644
--- a/R/SpatialPoints-methods.R
+++ b/R/SpatialPoints-methods.R
@@ -22,6 +22,7 @@ readShapePoints <- function(fn, proj4string=CRS(as.character(NA)),
}
writePointsShape <- function(x, fn, factor2char = TRUE, max_nchar=254) {
+ stopifnot(is(x, "SpatialPointsDataFrame"))
df <- as(x, "data.frame")
coords <- coordinates(x)
suppressWarnings(write.pointShape(coordinates=coords, df=df, file=fn,
diff --git a/R/SpatialPolys-methods.R b/R/SpatialPolys-methods.R
index 963eb5e..5c0a1f8 100644
--- a/R/SpatialPolys-methods.R
+++ b/R/SpatialPolys-methods.R
@@ -15,7 +15,7 @@ readShapePoly <- function(fn, IDvar=NULL, proj4string=CRS(as.character(NA)),
}
writePolyShape <- function(x, fn, factor2char = TRUE, max_nchar=254) {
- stopifnot(class(x) == "SpatialPolygonsDataFrame")
+ stopifnot(is(x, "SpatialPolygonsDataFrame"))
df <- as(x, "data.frame")
df <- data.frame(SP_ID=I(row.names(df)), df)
pls <- .SpP2polylist(as(x, "SpatialPolygons"))
diff --git a/R/checkHoles.R b/R/checkHoles.R
index 0354e0b..3953fa7 100644
--- a/R/checkHoles.R
+++ b/R/checkHoles.R
@@ -1,6 +1,7 @@
gpclibPermit <- function() {
if ("gpclib" %in% .packages(all.available = TRUE))
assign("gpclib", TRUE, envir=.MAPTOOLS_CACHE)
+ if (gpclibPermitStatus()) warning("support for gpclib will be withdrawn from maptools at the next major release")
gpclibPermitStatus()
}
@@ -43,7 +44,7 @@ checkPolygonsHoles <- function(x, properly=TRUE, avoidGEOS=FALSE,
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")
- gpc_res <- gpclib:::intersect(gpc, gpc_bb)
+ gpc_res <- gpclib::intersect(gpc, gpc_bb)
nP <- length(gpc_res at pts)
Srl <- vector(mode="list", length=nP)
for (j in 1:nP) {
diff --git a/R/elide.R b/R/elide.R
old mode 100644
new mode 100755
diff --git a/R/gc_dist.R b/R/gc_dist.R
old mode 100644
new mode 100755
diff --git a/R/kmlLine.R b/R/kmlLine.R
old mode 100644
new mode 100755
diff --git a/R/kmlLines.R b/R/kmlLines.R
new file mode 100644
index 0000000..f149163
--- /dev/null
+++ b/R/kmlLines.R
@@ -0,0 +1,100 @@
+# Generates kml file of lines for SpatialLinesDataFrame object
+
+kmlLines <- function(obj = NULL, kmlfile = NULL, name = "R Lines",
+ description = "", col = NULL, visibility = 1, lwd = 1,
+ kmlname = "", kmldescription = "") {
+
+ # Handle NULL object
+ if (is.null(obj))
+ return(list(header = c("<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+ "<kml xmlns=\"http://earth.google.com/kml/2.2\">",
+ "<Document>", paste("<name>", kmlname, "</name>", sep = ""),
+ paste("<description><![CDATA[", kmldescription, "]]></description>", sep = "")),
+ footer = c("</Document>", "</kml>")))
+
+ # Handle wrong data type
+ if (class(obj) == "list") {
+ if (!is.null(obj[[1]])) {
+ if ( class(obj[[1]]) != "Lines" && class(obj[[1]]) != "SpatialLinesDataFrame" ) {
+ stop("obj must be of class 'Lines' or 'SpatialLinesDataFrame' or a 'list' of either [package 'maptools']")
+ }
+ }
+ } else {
+ if (class(obj) != "Lines" && class(obj) != "SpatialLinesDataFrame") {
+ stop("obj must be of class 'Lines' or 'SpatialLinesDataFrame' or a 'list' of either [package 'maptools']")
+ } else {
+ # Put the "Lines" or "SpatialLinesDataFrame" inside a list for consistent code further down
+ obj <- list(obj)
+ }
+ }
+
+ # Color conversion
+ col2kmlcolor <- function(col) paste(rev(sapply(col2rgb(col, TRUE), function(x) sprintf("%02x", x))), collapse = "")
+
+ # Set up defaults for different sections
+ kml <- kmlStyle <- ""
+ kmlHeader <- c("<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+ "<kml xmlns=\"http://earth.google.com/kml/2.2\">",
+ "<Document>",
+ paste("<name>", kmlname, "</name>", sep = ""),
+ paste("<description><![CDATA[", kmldescription, "]]></description>", sep = ""))
+ kmlFooter <- c("</Document>", "</kml>")
+
+ # Replicate items as neded so as to avoid "NA" if the user provided a list of SpatialLines
+ # but only a single name or description
+ name <- rep(name,length.out=length(obj))
+ description <- rep(description,length.out=length(obj))
+ visibility <- rep(visibility,length.out=length(obj))
+ lwd <- rep(lwd,length.out=length(obj))
+ col <- rep(col,length.out=length(obj))
+
+ # Create a <PlaceMark> for each SpatialLines object
+ # NOTE: Use character vectors to store text and then paste it all together.
+ # NOTE: Do not use 'kml <- append(kml, next_section)' as pass-by-value greatly degrades performance
+
+ placemarks <- vector("character", length(obj))
+
+ for (list_index in seq(length(obj))) {
+
+ spatialLines <- obj[[list_index]]
+
+ if (!is.null(spatialLines)) {
+
+ # Create a Placemark with a MultiGeometry
+ placemarkHeader <- paste("<Placemark>\n",
+ "<name>",name[list_index],"</name>\n",
+ "<description><![CDATA[",description[list_index],"]]></description>\n",
+ "<visibility>",as.integer(visibility[list_index]),"</visibility>",sep="")
+
+ # Create a style
+ lineStyle <- paste("<Style><LineStyle><width>",lwd[list_index],"</width>",
+ "<color>",col2kmlcolor(col[list_index]),"</color></LineStyle></Style>",sep="")
+
+ # NOTE: Insert the kmlStyle in the <Placemark> instead of having a separate <Style> section
+ # NOTE: at the <Document> level with <styleUrl> at the the <Placemark> level.
+ # TODO: May want to use <styleUrl> with a separate <Style> section.
+
+ # Create a LineString for each element of obj at lines
+ lineStrings <- vector("character", length(spatialLines at lines))
+ for (i in 1:length(spatialLines at lines)) {
+ line <- spatialLines at lines[[i]]
+ coordinates <- paste(coordinates(line at Lines[[1]])[, 1], coordinates(line at Lines[[1]])[, 2], sep = "," ,collapse="\n")
+ lineStrings[i] <- paste("<LineString><coordinates>",coordinates,"</coordinates></LineString>",sep="\n")
+ }
+
+ multiGeometry <- paste("<MultiGeometry>",paste(lineStrings,collapse="\n"),"</MultiGeometry>",sep="\n")
+ placemarkFooter <- "</Placemark>\n"
+
+ placemarks[list_index] <- paste(placemarkHeader,lineStyle,multiGeometry,placemarkFooter,sep="\n")
+
+ }
+ }
+
+ kml <- paste(placemarks,sep="",collapse="\n")
+
+ # Write out the file or return the components
+ if (!is.null(kmlfile))
+ cat(paste(c(kmlHeader, "", kml, kmlFooter), # placeholder for separate kmlStyle section
+ sep = "", collapse = "\n"), "\n", file = kmlfile, sep = "")
+ else list(style = kmlStyle, content = kml)
+}
diff --git a/R/kmlPolygon.R b/R/kmlPolygon.R
old mode 100644
new mode 100755
diff --git a/R/kmlPolygons.R b/R/kmlPolygons.R
new file mode 100644
index 0000000..380b5a3
--- /dev/null
+++ b/R/kmlPolygons.R
@@ -0,0 +1,119 @@
+# Generates kml file of polygon(s) for SpatialPolygonDataFrame object
+
+kmlPolygons <- function(obj = NULL, kmlfile = NULL, name = "KML Polygons",
+ description = "", col = NULL, visibility = 1, lwd = 1,
+ border = "white", kmlname = "", kmldescription = "") {
+
+ # Handle NULL object
+ if (is.null(obj))
+ return(list(header = c("<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+ "<kml xmlns=\"http://earth.google.com/kml/2.2\">",
+ "<Document>", paste("<name>", kmlname, "</name>",
+ sep = ""), paste("<description><![CDATA[",
+ kmldescription, "]]></description>", sep = "")),
+ footer = c("</Document>", "</kml>")))
+
+ # Handle wrong data type
+ if (class(obj) == "list") {
+ if (!is.null(obj[[1]])) {
+ if ( class(obj[[1]]) != "Polygons" && class(obj[[1]]) != "SpatialPolygonsDataFrame" ) {
+ stop("obj must be of class 'Polygons' or 'SpatialPolygonsDataFrame' or a 'list' of either [package 'maptools']")
+ }
+ }
+ } else {
+ if (class(obj) != "Polygons" && class(obj) != "SpatialPolygonsDataFrame") {
+ stop("obj must be of class 'Polygons' or 'SpatialPolygonsDataFrame' or a 'list' of either [package 'maptools']")
+ } else {
+ # Put the "Polygons" or "SpatialPolygonsDataFrame" inside a list for consistent code further down
+ obj <- list(obj)
+ }
+ }
+
+ # Color conversion
+ col2kmlcolor <- function(col) paste(rev(sapply(col2rgb(col,TRUE), function(x) sprintf("%02x", x))), collapse = "")
+
+ # Set up defaults for different sections
+ kml <- kmlStyle <- ""
+
+ kmlHeader <- c("<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+ "<kml xmlns=\"http://earth.google.com/kml/2.2\">",
+ "<Document>", paste("<name>", kmlname, "</name>",
+ sep = ""), paste("<description><![CDATA[", kmldescription,
+ "]]></description>", sep = ""))
+ kmlFooter <- c("</Document>", "</kml>")
+
+ # Replicate items as neded so as to avoid "NA" if the user provided a list of SpatialPolygons
+ # but only a single name or description
+ name <- rep(name,length.out=length(obj))
+ description <- rep(description,length.out=length(obj))
+ visibility <- rep(visibility,length.out=length(obj))
+ lwd <- rep(lwd,length.out=length(obj))
+ col <- rep(col,length.out=length(obj))
+ border <- rep(border,length.out=length(obj))
+
+ # Create a <PlaceMark> for each SpatialPolygons object
+ # NOTE: Use character vectors to store text and then paste it all together.
+ # NOTE: Do not use 'kml <- append(kml, next_section)' as pass-by-value greatly degrades performance
+
+ placemarks <- vector("character", length(obj))
+
+ for (list_index in seq(length(obj))) {
+
+ spatialPolygons <- obj[[list_index]]
+
+ if (!is.null(spatialPolygons)) {
+
+ # Create a Placemark with a MultiGeometry
+ placemarkHeader <- paste("<Placemark>\n",
+ "<name>",name[list_index],"</name>\n",
+ "<description><![CDATA[",description[list_index],"]]></description>\n",
+ "<visibility>",as.integer(visibility[list_index]),"</visibility>",sep="")
+
+ # Create a style
+ if (is.null(col)) {
+ PolyStyle <- "<PolyStyle><fill>0</fill></PolyStyle>"
+ } else {
+ PolyStyle <- paste("<PolyStyle><color>",col2kmlcolor(col[list_index]),
+ "</color><fill>1</fill></PolyStyle>",sep="")
+ }
+ polygonStyle <- paste("<Style><LineStyle><width>",lwd[list_index],"</width>",
+ "<color>",col2kmlcolor(border[list_index]),"</color></LineStyle>",
+ PolyStyle,"</Style>",sep="")
+
+ # NOTE: Insert the kmlStyle in the <Placemark> instead of having a separate <Style> section
+ # NOTE: at the <Document> level with <styleUrl> at the the <Placemark> level.
+ # TODO: May want to use <styleUrl> with a separate <Style> section.
+
+ # NOTE: The <Placemark> we are currently working on can have multiple <Polygon> elements
+
+ # Create a polygonString for each element of obj at polygons
+
+ polygonStrings <- vector("character", length(spatialPolygons at polygons))
+ for (i in 1:length(spatialPolygons at polygons)) {
+ polygon <- spatialPolygons at polygons[[i]]@Polygons[[1]]
+ coordinates <- paste(coordinates(polygon)[,1], coordinates(polygon)[,2], sep=",", collapse="\n")
+ polygonStrings[i] <- paste("<Polygon>",
+ ifelse(polygon at hole,"<innerBoundaryIs>","<outerBoundaryIs>"),
+ "<LinearRing><coordinates>",coordinates,"</coordinates></LinearRing>",
+ ifelse(polygon at hole,"</innerBoundaryIs>","</outerBoundaryIs>"),
+ "</Polygon>",sep="\n")
+ }
+
+ multiGeometry <- paste("<MultiGeometry>",paste(polygonStrings,collapse="\n"),"</MultiGeometry>",sep="\n")
+ placemarkFooter <- "</Placemark>\n"
+
+ placemarks[list_index] <- paste(placemarkHeader,polygonStyle,multiGeometry,placemarkFooter,sep="\n")
+
+ }
+
+ }
+
+ kml <- paste(placemarks,sep="",collapse="\n")
+
+ # Write out the file or return the components
+ if (!is.null(kmlfile))
+ cat(paste(c(kmlHeader, "", kml, kmlFooter), # placeholder for separate kmlStyle section
+ sep = "", collapse = "\n"), "\n", file = kmlfile, sep = "")
+ else list(style = kmlStyle, content = kml)
+
+}
diff --git a/R/maptools.R b/R/maptools.R
index 1bce628..b4aa9d3 100644
--- a/R/maptools.R
+++ b/R/maptools.R
@@ -439,7 +439,7 @@ Map2poly1 <- function(Map, region.id=NULL, raw=TRUE) {
xj <- pl[[ri[j]]]
jxc <- na.omit(xj[,1])
jyc <- na.omit(xj[,2])
- pip <- maptools:::mt.point.in.polygon(ixc,
+ pip <- mt.point.in.polygon(ixc,
iyc, jxc, jyc)
int[j] <- ((pip == 1) | (pip > 1))
# int[j] <- ((pip == 1) |
diff --git a/R/nowrapRecenter.R b/R/nowrapRecenter.R
index d1065a8..c1f78d2 100644
--- a/R/nowrapRecenter.R
+++ b/R/nowrapRecenter.R
@@ -67,8 +67,8 @@ nowrapSpatialPolygons <- function(obj, offset=0, eps=rep(.Machine$double.eps^(1/
bbmat2 <- 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)
- gpc_left <- gpclib:::intersect(gpc, as(bbmat1, "gpc.poly"))
- gpc_right <- gpclib:::intersect(gpc, as(bbmat2, "gpc.poly"))
+ 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)
nP <- length(gpc_res at pts)
if (nP == 0)
diff --git a/R/point_line_distance.R b/R/point_line_distance.R
index 8f87daa..9d67948 100644
--- a/R/point_line_distance.R
+++ b/R/point_line_distance.R
@@ -21,15 +21,20 @@ nearestPointOnLine = function(coordsLine, coordsPoint){
nearest_points[1:2, which.min(nearest_points[3,])]
}
-snapPointsToLines <- function( points, lines, maxDist=NA, withAttrs=TRUE) {
+snapPointsToLines <- function( points, lines, maxDist=NA, withAttrs=TRUE, idField=NA) {
- require("rgeos")
+ if (rgeosStatus()) {
+ require("rgeos")
+ } else {
+ stop("rgeos not installed")
+ }
- if (is(points, 'SpatialPoints') && missing(withAttrs))
+ if (class(points) == "SpatialPoints" && missing(withAttrs))
withAttrs = FALSE
+
+ if (class(points) == "SpatialPoints" && withAttrs==TRUE)
+ stop("A SpatialPoints object has no attributes! Please set withAttrs as FALSE.")
- if (is(points, 'SpatialPoints') && withAttrs==TRUE)
- stop("A SpatialPoints object has no attributes! Set withAttrs as FALSE.")
if (!is.na(maxDist)) {
w = gWithinDistance(points, lines, dist=maxDist, byid=TRUE)
@@ -51,9 +56,9 @@ snapPointsToLines <- function( points, lines, maxDist=NA, withAttrs=TRUE) {
nearestPointOnLine(coordsLines[[nearest_line_index[x]]][[1]],
coordsPoints[x,]), FUN.VALUE=c(0,0))
- # Recover lines' Ids (Ids and index differ if maxDist is given)
- if (!is.na(maxDist)) nearest_line_id = as.numeric(rownames(d)[nearest_line_index])+1
- else nearest_line_id = nearest_line_index
+ # Recover lines' Ids (If no id field has been specified, take the sp-lines id)
+ if (!is.na(idField)) nearest_line_id = lines at data[,idField][nearest_line_index]
+ else nearest_line_id = sapply(slot(lines, "lines"), function(i) slot(i, "ID"))[nearest_line_index]
# Create data frame and sp points
if (withAttrs) df = cbind(points at data, nearest_line_id)
diff --git a/R/sp_spat1.R b/R/sp_spat1.R
index f9c1deb..278df6a 100644
--- a/R/sp_spat1.R
+++ b/R/sp_spat1.R
@@ -14,7 +14,6 @@ if (!isClass("im"))
if (!isClass("tess"))
setClass("tess")
-
as.SpatialPoints.ppp = function(from) {
mult <- 1
if (!is.null(from$window$units) && !is.null(from$window$units$multiplier))
@@ -68,12 +67,9 @@ as.SpatialGridDataFrame.im = function(from) {
}
setAs("im", "SpatialGridDataFrame", as.SpatialGridDataFrame.im)
-
as.im.SpatialGridDataFrame = function(from) {
require(spatstat)
- xi <- sp:::as.image.SpatialGridDataFrame(from)
+ xi <- as.image.SpatialGridDataFrame(from)
im(t(xi$z), xcol=xi$x, yrow=xi$y)
}
setAs("SpatialGridDataFrame", "im", as.im.SpatialGridDataFrame)
-
-
diff --git a/R/union.R b/R/union.R
index 43fd333..f07a286 100644
--- a/R/union.R
+++ b/R/union.R
@@ -46,7 +46,7 @@ unionSpatialPolygons <- function(SpP, IDs, threshold=NULL, avoidGEOS=FALSE, avoi
iin <- length(pli)
resi <- as(pli[[1]], "gpc.poly")
for (j in 2:iin)
- resi <- gpclib:::union(resi, as(pli[[j]], "gpc.poly"))
+ 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"))})
diff --git a/build/vignette.rds b/build/vignette.rds
new file mode 100644
index 0000000..aa4357d
Binary files /dev/null and b/build/vignette.rds differ
diff --git a/data/wrld_simpl.rda b/data/wrld_simpl.rda
deleted file mode 100644
index c59ac24..0000000
Binary files a/data/wrld_simpl.rda and /dev/null differ
diff --git a/inst/ChangeLog b/inst/ChangeLog
index 645949f..f08d56a 100644
--- a/inst/ChangeLog
+++ b/inst/ChangeLog
@@ -1,320 +1,523 @@
+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
+
+2014-01-28 19:02 rsbivand
+
+ * 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
+
+2013-09-01 18:06 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-30 11:38 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-30 11:37 rsbivand
+
+ * .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 :::
+
+2013-08-07 11:17 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-08-07 11:15 rsbivand
+
+ * DESCRIPTION,
+ NAMESPACE, man/pointLabelLattice.Rd, man/spCbind-methods.Rd:
+ depends -> imports
+
+2013-07-02 19:01 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-07-02 19:01 rsbivand
+
+ * inst/LICENSE,
+ inst/README: tidy
+
+2013-07-02 18:00 rsbivand
+
+ * DESCRIPTION:
+ tidy
+
+2013-07-02 17:56 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-07-02 17:48 rsbivand
+
+ * DESCRIPTION:
+ tidy
+
+2013-06-27 20:50 edzer
+
+ * 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
+
+2013-06-25 17:11 rsbivand
+
+ * vignettes/combine_maptools.Rnw,
+ vignettes/combine_maptools.pdf: adding footnote
+
+2013-06-21 12:52 rsbivand
+
+ * ChangeLog,
+ inst/ChangeLog: tidy
+
+2013-06-21 12:50 rsbivand
+
+ * 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
+
+2013-06-20 18:16 rsbivand
+
+ * 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,
+ inst/shapes/co51_d90.dbf, inst/shapes/co51_d90.shp,
+ inst/shapes/co51_d90.shx, inst/share/90mfips.txt,
+ man/kmlLines.Rd, man/kmlPolygons.Rd, vignettes,
+ vignettes/combine_maptools.Rnw, vignettes/combine_maptools.pdf:
+ adding vignette, kml functions
+
+2013-03-30 12:53 rsbivand
+
+ * 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
+
+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
+
+2013-02-10 14:00 rsbivand
+
+ * 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,
@@ -323,93 +526,109 @@
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,
@@ -417,48 +636,58 @@
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
@@ -466,131 +695,163 @@
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
@@ -598,23 +859,28 @@
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
@@ -626,23 +892,28 @@
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
@@ -658,7 +929,8 @@
2008-04-13 16:47 rsbivand
- * PBS to SP SID bug
+ * PBS
+ to SP SID bug
2008-04-10 14:07 rsbivand
@@ -666,15 +938,18 @@
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
@@ -682,43 +957,53 @@
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
@@ -726,15 +1011,18 @@
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
@@ -742,11 +1030,13 @@
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
@@ -758,19 +1048,23 @@
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
@@ -778,23 +1072,28 @@
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
@@ -810,11 +1109,13 @@
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
@@ -822,23 +1123,28 @@
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
@@ -850,27 +1156,33 @@
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
@@ -886,31 +1198,38 @@
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
@@ -922,11 +1241,13 @@
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
@@ -938,7 +1259,8 @@
2006-03-01 08:53 rsbivand
- * checks on polylists
+ * checks
+ on polylists
2006-01-11 11:08 rsbivand
@@ -954,15 +1276,18 @@
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
@@ -970,27 +1295,33 @@
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
@@ -1002,21 +1333,26 @@
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/LICENSE b/inst/LICENSE
deleted file mode 100644
index b8ff71a..0000000
--- a/inst/LICENSE
+++ /dev/null
@@ -1,99 +0,0 @@
-This file is intended to clarify ownership and copyright: where
-possible individual files also carry brief copyright notices.
-
-Copyrights
-==========
-
-Files: src/shapefil.h, src/shpopen.c and src/shptree.c are
-copyright (c) 1998 Frank Warmerdam, and released under the conditions
-given in http://shapelib.maptools.org/license.html. His code is available
-under the MIT or LGPL licence, and the latter is chosen here.
-
-This software is available under the following "MIT Style" license, or
-at the option of the licensee under the LGPL (see LICENSE.LGPL). This
-option is discussed in more detail in shapelib.html.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Further details of Shapelib may be found at its website
-
-http://shapelib.maptools.org/
-
-Files: src/Rcentroid.c, src/Rshapeinfo.c, src/maptools.h, and
-src/Rshapeget.c are copyright (c) 2000-2001 by Nicholas Lewin-Koh and are
-subject to the licence at the foot of this file. Some portions of these
-files are based on shapelib/contrib files, and copyright and license
-conditions follow from the included code: RingCentroid_2d, shpcat.c,
-shpinfo.c, and SHPRingDir_2d Copyright (c) 1999, Carl Anderson
-
-Files: inst/shapes/baltim.*, inst/shapes/columbus.*, and inst/shapes/sids.*
-are derived by permission from SAL data files
-prepared by Luc Anselin; they were downloaded from:
-
-http://geodacenter.asu.edu/sdata
-
-under the following conditions: "The data are provided as is, without
-any warranties. Please make sure to give proper credit when using
-them in any publications. Some of the data sets are purely illustrative
-and should not be used for substantive research."
-
-Files: inst/shapes/fylk-val* are copyright Statens Kartverk 2001, and
-were released (with a collection of other shapefiles) to the public domain
-in July 2001. The link to the relevant page under http://www.statkart.no
-has now expired, this copy downloaded 13 July 2001.
-
-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: 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
-attribution: "The world_borders.zip dataset has been superseded by Bjørn
-Sandvik's improved version, TM_WORLD_BORDERS-0.2.zip, mirrored from
-thematicmapping.org." The country Polygons objects and the data slot data
-frame row numbers have been set to the ISO 3166 three letter codes.
-
-All other files are copyright (c) 2001-2004 Roger S. Bivand and Nicholas
-Lewin-Koh, and are subject to the licence at the foot of this file.
-
-Licence
-=======
-
- This is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-
-
-The file COPYING in the R top-level directory is a copy of the "GNU
-General Public License".
-
-Roger.Bivand at nhh.no
-
-
diff --git a/LICENSE b/inst/README
similarity index 100%
rename from LICENSE
rename to inst/README
diff --git a/inst/doc/combine_maptools.R b/inst/doc/combine_maptools.R
new file mode 100644
index 0000000..8a68f03
--- /dev/null
+++ b/inst/doc/combine_maptools.R
@@ -0,0 +1,249 @@
+### R code from vignette source 'combine_maptools.Rnw'
+### Encoding: UTF-8
+
+###################################################
+### code chunk number 1: combine_maptools.Rnw:44-47
+###################################################
+owidth <- getOption("width")
+options("width"=90)
+.PngNo <- 0
+
+
+###################################################
+### code chunk number 2: afig (eval = FALSE)
+###################################################
+## .PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+## pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+## opar <- par(mar=c(3,3,1,1)+0.1)
+
+
+###################################################
+### code chunk number 3: afigl (eval = FALSE)
+###################################################
+## .PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+## pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+
+
+###################################################
+### code chunk number 4: bfigl (eval = FALSE)
+###################################################
+## .PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+## pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+
+
+###################################################
+### code chunk number 5: bfig (eval = FALSE)
+###################################################
+## .PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+## pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+## opar <- par(mar=c(3,3,1,1)+0.1)
+
+
+###################################################
+### code chunk number 6: zfig (eval = FALSE)
+###################################################
+## par(opar)
+## dev.null <- dev.off()
+## cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+
+
+###################################################
+### code chunk number 7: zfigl (eval = FALSE)
+###################################################
+## dev.null <- dev.off()
+## cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+
+
+###################################################
+### code chunk number 8: combine_maptools.Rnw:101-111
+###################################################
+owd <- getwd()
+setwd(system.file("shapes", package="maptools"))
+library(maptools)
+nc90 <- readShapeSpatial("co37_d90")
+proj4string(nc90) <- CRS("+proj=longlat +datum=NAD27")
+sc90 <- readShapeSpatial("co45_d90")
+proj4string(sc90) <- CRS("+proj=longlat +datum=NAD27")
+va90 <- readShapeSpatial("co51_d90")
+proj4string(va90) <- CRS("+proj=longlat +datum=NAD27")
+setwd(owd)
+
+
+###################################################
+### code chunk number 9: combine_maptools.Rnw:117-124
+###################################################
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(va90, xlim=c(-85,-75), ylim=c(32,40), axes=TRUE, border="grey10")
+plot(nc90, add=TRUE, border="grey40")
+plot(sc90, add=TRUE, border="grey70")
+par(oopar)
+par(opar)
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+
+
+###################################################
+### code chunk number 10: combine_maptools.Rnw:148-149
+###################################################
+library(maptools)
+
+
+###################################################
+### code chunk number 11: combine_maptools.Rnw:151-155
+###################################################
+names(sc90)
+sc90a <- spChFIDs(sc90, paste(sc90$ST, sc90$CO, sep=""))
+sc90a <- sc90a[,-(1:4)]
+names(sc90a)
+
+
+###################################################
+### code chunk number 12: combine_maptools.Rnw:157-158
+###################################################
+proj4string(sc90a) <- CRS(proj4string(sc90a))
+
+
+###################################################
+### code chunk number 13: combine_maptools.Rnw:169-170
+###################################################
+names(nc90)
+
+
+###################################################
+### code chunk number 14: combine_maptools.Rnw:172-173 (eval = FALSE)
+###################################################
+## nc90a <- spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep=""))
+
+
+###################################################
+### code chunk number 15: combine_maptools.Rnw:175-176
+###################################################
+try1 <- try(spChFIDs(nc90, paste(nc90$ST, nc90$CO, sep="")))
+
+
+###################################################
+### code chunk number 16: combine_maptools.Rnw:178-179
+###################################################
+cat(try1)
+
+
+###################################################
+### code chunk number 17: combine_maptools.Rnw:189-190
+###################################################
+table(table(paste(nc90$ST, nc90$CO, sep="")))
+
+
+###################################################
+### code chunk number 18: combine_maptools.Rnw:216-219
+###################################################
+if (rgeosStatus()) {
+nc90a <- unionSpatialPolygons(nc90, IDs=paste(nc90$ST, nc90$CO, sep=""))
+}
+
+
+###################################################
+### code chunk number 19: combine_maptools.Rnw:229-234
+###################################################
+if (rgeosStatus()) {
+nc90_df <- as(nc90, "data.frame")[!duplicated(nc90$CO),-(1:4)]
+row.names(nc90_df) <- paste(nc90_df$ST, nc90_df$CO, sep="")
+nc90b <- SpatialPolygonsDataFrame(nc90a, nc90_df)
+}
+
+
+###################################################
+### code chunk number 20: combine_maptools.Rnw:254-263
+###################################################
+if (rgeosStatus()) {
+va90a <- spChFIDs(va90, paste(va90$ST, va90$CO, sep=""))
+va90a <- va90a[,-(1:4)]
+va90_pl <- slot(va90a, "polygons")
+va90_pla <- lapply(va90_pl, checkPolygonsHoles)
+p4sva <- CRS(proj4string(va90a))
+vaSP <- SpatialPolygons(va90_pla, proj4string=p4sva)
+va90b <- SpatialPolygonsDataFrame(vaSP, data=as(va90a, "data.frame"))
+}
+
+
+###################################################
+### code chunk number 21: combine_maptools.Rnw:303-309
+###################################################
+if (rgeosStatus()) {
+nc_sc_va90 <- spRbind(spRbind(nc90b, sc90a), va90b)
+FIPS <- row.names(nc_sc_va90)
+str(FIPS)
+length(slot(nc_sc_va90, "polygons"))
+}
+
+
+###################################################
+### code chunk number 22: combine_maptools.Rnw:338-340
+###################################################
+t1 <- read.fwf(system.file("share/90mfips.txt", package="maptools"), skip=21,
+ widths=c(4,4,4,4,2,6,2,3,3,1,7,5,3,51), colClasses = "character")
+
+
+###################################################
+### code chunk number 23: combine_maptools.Rnw:342-348
+###################################################
+t2 <- t1[1:2004,c(1,7,8,14)]
+t3 <- t2[complete.cases(t2),]
+cnty1 <- t3[t3$V7 != " ",]
+ma1 <- t3[t3$V7 == " ",c(1,4)]
+cnty2 <- cnty1[which(!is.na(match(cnty1$V7, c("37", "45", "51")))),]
+cnty2$FIPS <- paste(cnty2$V7, cnty2$V8, sep="")
+
+
+###################################################
+### code chunk number 24: combine_maptools.Rnw:368-375
+###################################################
+if (rgeosStatus()) {
+MA_FIPS <- cnty2$V1[match(FIPS, cnty2$FIPS)]
+MA <- ma1$V14[match(MA_FIPS, ma1$V1)]
+MA_df <- data.frame(MA_FIPS=MA_FIPS, MA=MA, row.names=FIPS)
+nc_sc_va90a <- spCbind(nc_sc_va90, MA_df)
+ncscva_MA <- unionSpatialPolygons(nc_sc_va90a, nc_sc_va90a$MA_FIPS)
+}
+
+
+###################################################
+### code chunk number 25: combine_maptools.Rnw:381-392
+###################################################
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+if (rgeosStatus()) {
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(nc_sc_va90, border="grey", axes=TRUE)
+plot(ncscva_MA, lwd=2, add=TRUE)
+text(coordinates(ncscva_MA), labels=row.names(ncscva_MA), cex=0.6)
+par(oopar)
+} else {
+plot(1)
+}
+par(opar)
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+
+
+###################################################
+### code chunk number 26: combine_maptools.Rnw:410-417
+###################################################
+if (rgeosStatus()) {
+np <- sapply(slot(ncscva_MA, "polygons"), function(x) length(slot(x, "Polygons")))
+table(np)
+MA_fips <- row.names(ncscva_MA)
+MA_name <- ma1$V14[match(MA_fips, ma1$V1)]
+data.frame(MA_fips, MA_name)[np > 1,]
+}
+
+
+###################################################
+### code chunk number 27: combine_maptools.Rnw:425-426
+###################################################
+options("width"=owidth)
+
+
diff --git a/inst/doc/combine_maptools.Rnw b/inst/doc/combine_maptools.Rnw
new file mode 100644
index 0000000..a4ac4b1
--- /dev/null
+++ b/inst/doc/combine_maptools.Rnw
@@ -0,0 +1,431 @@
+%\VignetteIndexEntry{Combining Spatial Data}
+%\VignetteDepends{}
+%\VignetteKeywords{spatial}
+%\VignettePackage{maptools}
+\documentclass[a4paper,10pt]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage[dvips]{graphicx,color}
+\usepackage{times}
+\usepackage{hyperref}
+\usepackage{natbib}
+\usepackage[english]{babel}
+\usepackage{xspace}
+
+\usepackage{Sweave}
+\usepackage{mathptm}
+\usepackage{natbib}
+
+\setkeys{Gin}{width=0.95\textwidth}
+\newcommand{\strong}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\let\pkg=\strong
+\RequirePackage{alltt}
+\newenvironment{example}{\begin{alltt}}{\end{alltt}}
+\newenvironment{smallexample}{\begin{alltt}\small}{\end{alltt}}
+\newcommand{\code}[1]{\texttt{\small #1}}
+\def\RR{\textsf{R}\xspace}
+\def\SP{\texttt{S-PLUS}\xspace}
+\def\SS{\texttt{S}\xspace}
+%#Sweave("combine_maptools.Rnw", keep.source=FALSE)
+\SweaveOpts{keep.source=FALSE}
+
+
+\title{Combining Spatial Data\footnote{This vignette formed pp. 120--126 of the first edition of Bivand, R. S.,
+Pebesma, E. and Gómez-Rubio V. (2008) Applied Spatial Data Analysis with R,
+Springer-Verlag, New York. It was retired from the second edition (2013) to
+accommodate material on other topics, and is made available in this form
+with the understanding of the publishers.}}
+\author{Roger Bivand}
+
+\begin{document}
+
+\maketitle
+
+<<echo=FALSE>>=
+owidth <- getOption("width")
+options("width"=90)
+.PngNo <- 0
+@
+
+<<label=afig,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+@
+<<label=afigl,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+@
+<<label=bfigl,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+@
+<<label=bfig,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+@
+
+<<label=zfig,echo=FALSE,eval=FALSE>>=
+par(opar)
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+@
+<<label=zfigl,echo=FALSE,eval=FALSE>>=
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+@
+
+\section{Introduction}
+
+%FIXME
+
+\section{Checking Topologies}
+
+In this vignette, we look at a practical example
+involving the cleaning of spatial objects originally read into \RR from
+shapefiles published by the US Census. We then aggregate them up
+to metropolitan areas using a text table also from the US Census.
+
+The data in this case are for polygons representing county
+boundaries in 1990 of North Carolina, South Carolina, and
+Virginia, as shown in Fig.\,\ref{fig:poly3a}. The attribute data
+for each polygon are the standard polygon identifiers, state and
+county identifiers, and county names. All the spatial objects
+have the same number of columns of attribute data of the same
+types and with the same names. The files are provided without
+coordinate reference systems as shapefiles; the metadata are used
+for choosing the \code{CRS} values.
+
+\begin{footnotesize}
+<<echo=TRUE,eval=TRUE,keep.source=FALSE>>=
+owd <- getwd()
+setwd(system.file("shapes", package="maptools"))
+library(maptools)
+nc90 <- readShapeSpatial("co37_d90")
+proj4string(nc90) <- CRS("+proj=longlat +datum=NAD27")
+sc90 <- readShapeSpatial("co45_d90")
+proj4string(sc90) <- CRS("+proj=longlat +datum=NAD27")
+va90 <- readShapeSpatial("co51_d90")
+proj4string(va90) <- CRS("+proj=longlat +datum=NAD27")
+setwd(owd)
+@
+\end{footnotesize}
+
+\begin{figure}[htb]
+\centering
+<<echo=FALSE,results=tex>>=
+<<bfig>>
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(va90, xlim=c(-85,-75), ylim=c(32,40), axes=TRUE, border="grey10")
+plot(nc90, add=TRUE, border="grey40")
+plot(sc90, add=TRUE, border="grey70")
+par(oopar)
+<<zfig>>
+@
+\caption{The
+three states plotted from input spatial objects using different
+grey colours for county boundaries}
+\label{fig:poly3a}
+\end{figure}
+
+\noindent
+As read in, shapefiles usually have the polygon IDs set to the external
+file feature sequence number from zero to one less than the number
+of features. In our case, wanting to combine three states, we
+need to change the ID values so that they are unique across the study
+area. We can use the FIPS code (Federal Information Processing Standards
+Publication 6-4), which is simply the two-digit state FIPS code placed in
+front of the three-digit within-state FIPS county code, ending up with
+a five-digit string uniquely identifying each county. We can also drop
+the first four attribute data columns, two of which (area and perimeter)
+are misleading for objects in geographical coordinates, and the other two
+are internal ID values from the software used to generate the shapefiles,
+replicating the original feature IDs. We can start with the data set of
+South Carolina (\code{sc90}):
+
+\begin{footnotesize}
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+library(maptools)
+@
+<<echo=TRUE,keep.source=FALSE>>=
+names(sc90)
+sc90a <- spChFIDs(sc90, paste(sc90$ST, sc90$CO, sep=""))
+sc90a <- sc90a[,-(1:4)]
+names(sc90a)
+@
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+proj4string(sc90a) <- CRS(proj4string(sc90a))
+@
+\end{footnotesize}
+
+
+\subsection{Dissolving Polygons}
+
+When we try the same sequence of commands for North Carolina, we run
+into difficulties:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+names(nc90)
+@
+<<echo=TRUE,eval=FALSE,keep.source=FALSE>>=
+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="")))
+@
+<<eval=TRUE,echo=FALSE>>=
+cat(try1)
+@
+\end{footnotesize}
+
+\noindent
+Tabulating the frequencies of polygons per unique county ID, we can see
+that 98 of North Carolina's counties are represented by single polygons,
+while one has two polygons, and one (on the coast) has four.
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+table(table(paste(nc90$ST, nc90$CO, sep="")))
+@
+\end{footnotesize}
+
+\noindent
+One reason for spatial data being structured in this way is that it
+is following the OpenGIS$^{\mbox{\scriptsize\textregistered}}$\footnote{See \url{http://www.opengeospatial.org/}.}
+Simple Features Specification,
+\label{OpenGIS_SFS}
+which allows polygons to have one and only one external boundary
+ring, and an unlimited number of internal boundaries -- holes.
+This means that multiple external boundaries -- such as a county
+made up of several islands -- are represented as multiple
+polygons. In the specification, they are linked to attribute data
+through a look-up table pointing to the appropriate attribute
+data row.
+
+We need to restructure the \code{SpatialPolygons} object such that the
+\code{Polygon} objects belonging to each county belong to the same
+\code{Polygons} object. To do this, we use a function\footnote{This
+function requires that the \pkg{rgeos} package is also installed.} in
+the \pkg{maptools} package also used for dissolving or merging polygons,
+but which can be used here to re-package the original features, so that
+each \code{Polygons} object corresponds to one and only one county:
+
+\begin{footnotesize}
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc90a <- unionSpatialPolygons(nc90, IDs=paste(nc90$ST, nc90$CO, sep=""))
+}
+@
+\end{footnotesize}
+
+\noindent The function uses the IDs argument to set the ID slots
+of the output \code{SpatialPolygons} object. Having sorted out
+the polygons, we need to remove the duplicate rows from the data
+frame and put the pieces back together again:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc90_df <- as(nc90, "data.frame")[!duplicated(nc90$CO),-(1:4)]
+row.names(nc90_df) <- paste(nc90_df$ST, nc90_df$CO, sep="")
+nc90b <- SpatialPolygonsDataFrame(nc90a, nc90_df)
+}
+@
+\end{footnotesize}
+
+\subsection{Checking Hole Status}
+
+Looking again at Fig.\,\ref{fig:poly3a}, we can see that while
+neither North Carolina nor South Carolina has included boroughs
+within counties, these are frequently found in Virginia. While
+data read from external sources are expected to be structured
+correctly, with the including polygon having an outer edge and an
+inner hole, into which the outer edge of the included borough
+fits, we can also
+check and correct the settings of the hole slot in \code{Polygon}
+objects. The \code{checkPolygonsHoles} function takes a
+\code{Polygons} object as its argument, and, if multiple
+\code{Polygon} objects belong to it, checks them for hole status
+using functions from the \pkg{rgeos} package:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+va90a <- spChFIDs(va90, paste(va90$ST, va90$CO, sep=""))
+va90a <- va90a[,-(1:4)]
+va90_pl <- slot(va90a, "polygons")
+va90_pla <- lapply(va90_pl, checkPolygonsHoles)
+p4sva <- CRS(proj4string(va90a))
+vaSP <- SpatialPolygons(va90_pla, proj4string=p4sva)
+va90b <- SpatialPolygonsDataFrame(vaSP, data=as(va90a, "data.frame"))
+}
+@
+\end{footnotesize}
+
+\noindent
+Here we have changed the \code{Polygons} ID values as before, and then
+processed each \code{Polygons} object in turn for internal consistency, finally
+re-assembling the cleaned object. So we now have three spatial objects
+with mutually unique IDs, and with data slots containing data frames
+with the same numbers and kinds of columns with the same names.
+
+
+\section{Combining Spatial Data}
+
+It is quite often desirable to combine spatial data of the same kind,
+in addition to combining positional data of different kinds as discussed
+earlier in this chapter. There are functions \code{rbind} and \code{cbind}
+in \RR for combining objects by rows or columns, and \code{rbind} methods
+for \code{SpatialPixels} and \code{SpatialPixelsDataFrame} objects, as
+well as a \code{cbind} method for \code{SpatialGridDataFrame} objects
+are included in \pkg{sp}. In addition, methods with slightly different
+names to carry out similar operations are included in the \pkg{maptools}
+package.
+
+\subsection{Combining Positional Data}
+
+The \code{spRbind} method combines positional data, such as two
+\code{SpatialPoints} objects or two \code{SpatialPointsDataFrame}
+objects with matching column names and types in their data slots.
+The method is also implemented for \code{SpatialLines} and
+\code{SpatialPolygons} objects and their \code{*DataFrame}
+extensions. The methods do not check for duplication or
+overlapping of the spatial objects being combined, but do reject
+attempts to combine objects that would have resulted in
+non-unique IDs.
+
+Because the methods only take two arguments, combining more than two
+involves repeating calls to the method:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc_sc_va90 <- spRbind(spRbind(nc90b, sc90a), va90b)
+FIPS <- row.names(nc_sc_va90)
+str(FIPS)
+length(slot(nc_sc_va90, "polygons"))
+}
+@
+\end{footnotesize}
+
+\subsection{Combining Attribute Data}
+\label{spCbind:here}
+
+Here, as very often found in practice, we need to combine data
+for the same spatial objects from different sources, where one
+data source includes the geometries and an identifying index
+variable, and other data sources include the same index variable
+with additional variables. They often include more observations
+than our geometries, sometimes have no data for some of our
+geometries, and not are infrequently sorted in a different
+order. The data cleaning involved in getting ready for analysis
+is a little more tedious with spatial data, as we see, but
+does not differ in principle from steps taken with non-spatial
+data.
+
+The text file provided by the US Census tabulating which counties
+belonged to each metropolitan area in 1990 has a header, which
+has already been omitted, a footer with formatting information,
+and many blank columns. We remove the footer and the blank
+columns first, and go on to remove rows with no data -- the
+metropolitan areas are separated in the file by empty lines. The
+required rows and column numbers were found by inspecting the
+file before reading it into \RR:
+
+\begin{footnotesize}
+<<echo=TRUE,eval=TRUE,keep.source=FALSE>>=
+t1 <- read.fwf(system.file("share/90mfips.txt", package="maptools"), skip=21,
+ widths=c(4,4,4,4,2,6,2,3,3,1,7,5,3,51), colClasses = "character")
+@
+<<echo=TRUE,keep.source=FALSE>>=
+t2 <- t1[1:2004,c(1,7,8,14)]
+t3 <- t2[complete.cases(t2),]
+cnty1 <- t3[t3$V7 != " ",]
+ma1 <- t3[t3$V7 == " ",c(1,4)]
+cnty2 <- cnty1[which(!is.na(match(cnty1$V7, c("37", "45", "51")))),]
+cnty2$FIPS <- paste(cnty2$V7, cnty2$V8, sep="")
+@
+\end{footnotesize}
+
+\noindent We next break out an object with metro IDs, state and
+county IDs, and county names (\code{cnty1}), and an object with
+metro IDs and metro names (\code{ma1}). From there, we subset the
+counties to the three states, and add the FIPS string for each
+county, to make it possible to combine the new data concerning
+metro area membership to our combined county map. We create an
+object (\code{MA\_FIPS}) of county metro IDs by matching the
+\code{cnty2} FIPS IDs with those of the counties on the map, and
+then retrieving the metro area names from \code{ma1}. These two
+variables are then made into a data frame, the appropriate row
+names inserted and combined with the county map, with method
+\code{spCbind}. At last we are ready to dissolve the counties
+belonging to metro areas and to discard those not belonging to
+metro areas, using \code{unionSpatialPolygons}:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+MA_FIPS <- cnty2$V1[match(FIPS, cnty2$FIPS)]
+MA <- ma1$V14[match(MA_FIPS, ma1$V1)]
+MA_df <- data.frame(MA_FIPS=MA_FIPS, MA=MA, row.names=FIPS)
+nc_sc_va90a <- spCbind(nc_sc_va90, MA_df)
+ncscva_MA <- unionSpatialPolygons(nc_sc_va90a, nc_sc_va90a$MA_FIPS)
+}
+@
+\end{footnotesize}
+
+\begin{figure}[htb]
+\centering
+<<echo=FALSE,results=tex>>=
+<<bfig>>
+if (rgeosStatus()) {
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(nc_sc_va90, border="grey", axes=TRUE)
+plot(ncscva_MA, lwd=2, add=TRUE)
+text(coordinates(ncscva_MA), labels=row.names(ncscva_MA), cex=0.6)
+par(oopar)
+} else {
+plot(1)
+}
+<<zfig>>
+@
+\caption{The
+three states with county boundaries plotted in grey, and
+Metropolitan area boundaries plotted in black; Metro area
+standard IDs are shown}
+\label{fig:poly3b}
+\end{figure}
+
+Figure~\ref{fig:poly3b} shows the output object plotted on top of
+the cleaned input county boundaries. There does appear to be a
+problem, however, because one of the output boundaries has no
+name -- it is located between 6760 and 5720 in eastern Virginia.
+If we do some more matching, to extract the names of the
+metropolitan areas, we can display the name of the area with
+multiple polygons:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+np <- sapply(slot(ncscva_MA, "polygons"), function(x) length(slot(x, "Polygons")))
+table(np)
+MA_fips <- row.names(ncscva_MA)
+MA_name <- ma1$V14[match(MA_fips, ma1$V1)]
+data.frame(MA_fips, MA_name)[np > 1,]
+}
+@
+\end{footnotesize}
+
+The Norfolk-Virginia Beach-Newport News, VA MSA is located on both sides
+of Hampton Roads, and the label has been positioned at the centre point
+of the largest member polygon.
+
+<<echo=FALSE>>=
+options("width"=owidth)
+@
+
+
+\end{document}
+
diff --git a/inst/doc/combine_maptools.pdf b/inst/doc/combine_maptools.pdf
new file mode 100644
index 0000000..79d67cd
Binary files /dev/null and b/inst/doc/combine_maptools.pdf differ
diff --git a/inst/shapes/baltim.dbf b/inst/shapes/baltim.dbf
deleted file mode 100644
index be9d815..0000000
Binary files a/inst/shapes/baltim.dbf and /dev/null differ
diff --git a/inst/shapes/baltim.shp b/inst/shapes/baltim.shp
deleted file mode 100644
index f867886..0000000
Binary files a/inst/shapes/baltim.shp and /dev/null differ
diff --git a/inst/shapes/baltim.shx b/inst/shapes/baltim.shx
deleted file mode 100644
index 8414722..0000000
Binary files a/inst/shapes/baltim.shx and /dev/null differ
diff --git a/inst/shapes/co37_d90.dbf b/inst/shapes/co37_d90.dbf
new file mode 100644
index 0000000..c4a4e38
Binary files /dev/null and b/inst/shapes/co37_d90.dbf differ
diff --git a/inst/shapes/co37_d90.shp b/inst/shapes/co37_d90.shp
new file mode 100644
index 0000000..29c5c0f
Binary files /dev/null and b/inst/shapes/co37_d90.shp differ
diff --git a/inst/shapes/co37_d90.shx b/inst/shapes/co37_d90.shx
new file mode 100644
index 0000000..56101d4
Binary files /dev/null and b/inst/shapes/co37_d90.shx differ
diff --git a/inst/shapes/co45_d90.dbf b/inst/shapes/co45_d90.dbf
new file mode 100644
index 0000000..36245c6
Binary files /dev/null and b/inst/shapes/co45_d90.dbf differ
diff --git a/inst/shapes/co45_d90.shp b/inst/shapes/co45_d90.shp
new file mode 100644
index 0000000..36076bf
Binary files /dev/null and b/inst/shapes/co45_d90.shp differ
diff --git a/inst/shapes/co45_d90.shx b/inst/shapes/co45_d90.shx
new file mode 100644
index 0000000..b200cfc
Binary files /dev/null and b/inst/shapes/co45_d90.shx differ
diff --git a/inst/shapes/co51_d90.dbf b/inst/shapes/co51_d90.dbf
new file mode 100644
index 0000000..ad245b3
Binary files /dev/null and b/inst/shapes/co51_d90.dbf differ
diff --git a/inst/shapes/co51_d90.shp b/inst/shapes/co51_d90.shp
new file mode 100644
index 0000000..c11e7c0
Binary files /dev/null and b/inst/shapes/co51_d90.shp differ
diff --git a/inst/shapes/co51_d90.shx b/inst/shapes/co51_d90.shx
new file mode 100644
index 0000000..825ad5e
Binary files /dev/null and b/inst/shapes/co51_d90.shx differ
diff --git a/inst/shapes/columbus.dbf b/inst/shapes/columbus.dbf
deleted file mode 100644
index f850bda..0000000
Binary files a/inst/shapes/columbus.dbf and /dev/null differ
diff --git a/inst/shapes/columbus.shp b/inst/shapes/columbus.shp
deleted file mode 100644
index d6dde43..0000000
Binary files a/inst/shapes/columbus.shp and /dev/null differ
diff --git a/inst/shapes/columbus.shx b/inst/shapes/columbus.shx
deleted file mode 100644
index 7086b6f..0000000
Binary files a/inst/shapes/columbus.shx and /dev/null differ
diff --git a/inst/shapes/pointZ.dbf b/inst/shapes/pointZ.dbf
deleted file mode 100644
index b379b45..0000000
Binary files a/inst/shapes/pointZ.dbf and /dev/null differ
diff --git a/inst/shapes/pointZ.prj b/inst/shapes/pointZ.prj
deleted file mode 100644
index 00cb470..0000000
--- a/inst/shapes/pointZ.prj
+++ /dev/null
@@ -1 +0,0 @@
-PROJCS["NAD_1983_UTM_Zone_10N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
diff --git a/inst/shapes/pointZ.shp b/inst/shapes/pointZ.shp
deleted file mode 100644
index 3797f1a..0000000
Binary files a/inst/shapes/pointZ.shp and /dev/null differ
diff --git a/inst/shapes/pointZ.shx b/inst/shapes/pointZ.shx
deleted file mode 100644
index 5f48b43..0000000
Binary files a/inst/shapes/pointZ.shx and /dev/null differ
diff --git a/inst/shapes/sids.dbf b/inst/shapes/sids.dbf
deleted file mode 100644
index 9520178..0000000
Binary files a/inst/shapes/sids.dbf and /dev/null differ
diff --git a/inst/shapes/sids.shp b/inst/shapes/sids.shp
deleted file mode 100644
index 79c4a41..0000000
Binary files a/inst/shapes/sids.shp and /dev/null differ
diff --git a/inst/shapes/sids.shx b/inst/shapes/sids.shx
deleted file mode 100644
index 670fa43..0000000
Binary files a/inst/shapes/sids.shx and /dev/null differ
diff --git a/inst/share/90mfips.txt b/inst/share/90mfips.txt
new file mode 100644
index 0000000..29df8cb
--- /dev/null
+++ b/inst/share/90mfips.txt
@@ -0,0 +1,2053 @@
+METROPOLITAN AREAS AND COMPONENTS, 1990 WITH FIPS CODES
+
+(Metropolitan Areas defined by Office of Management and Budget, 6/30/90)
+
+Source: U.S. Census Bureau
+Internet Release Date: November 1998
+Last Revised Date: March 2001
+
+The file layout is located at the end of the data file.
+
+ABBREVIATIONS:
+ MSA= Metropolitan Statistical Area
+ CMSA= Consolidated Metropolitan Statistical Area
+ PMSA= Primary Metropolitan Statistical Area
+ F = Central/Outlying County or City/Town Flag (1 = Central, 2 = Outlying)
+
+MSA/ ALT. State/* City/
+CMSA PMSA CMSA County F Town
+FIPS FIPS FIPS FIPS FIPS
+CODE CODE CODE CODE CODE Metropolitan Area and Component Names
+
+0040 Abilene, TX MSA
+0040 48441 1 Taylor County
+
+0060 Aguadilla, PR MSA
+0060 72003 2 Aguada Municipio
+0060 72005 1 Aguadilla Municipio
+0060 72071 2 Isabela Municipio
+0060 72099 2 Moca Municipio
+
+0120 Albany, GA MSA
+0120 13095 1 Dougherty County
+0120 13177 2 Lee County
+
+0160 Albany-Schenectady-Troy, NY MSA
+0160 36001 1 Albany County
+0160 36039 2 Greene County
+0160 36057 2 Montgomery County
+0160 36083 1 Rensselaer County
+0160 36091 2 Saratoga County
+0160 36093 1 Schenectady County
+
+0200 Albuquerque, NM MSA
+0200 35001 1 Bernalillo County
+
+0220 Alexandria, LA MSA
+0220 22079 1 Rapides Parish
+
+0240 Allentown-Bethlehem-Easton, PA-NJ MSA
+0240 34041 2 Warren County, NJ
+0240 42025 2 Carbon County, PA
+0240 42077 1 Lehigh County, PA
+0240 42095 1 Northampton County, PA
+
+0280 Altoona, PA MSA
+0280 42013 1 Blair County
+
+0320 Amarillo, TX MSA
+0320 48375 1 Potter County
+0320 48381 1 Randall County
+
+0380 Anchorage, AK MSA
+0380 02020 1 Anchorage Borough
+
+0400 Anderson, IN MSA
+0400 18095 1 Madison County
+
+0405 Anderson, SC MSA
+0405 45007 1 Anderson County
+
+0450 Anniston, AL MSA
+0450 01015 1 Calhoun County
+
+0460 Appleton-Oshkosh-Neenah, WI MSA
+0460 55015 1 Calumet County
+0460 55087 1 Outagamie County
+0460 55139 1 Winnebago County
+
+0470 Arecibo, PR MSA
+0470 72013 1 Arecibo Municipio
+0470 72027 2 Camuy Municipio
+0470 72065 1 Hatillo Municipio
+0470 72115 2 Quebradillas Municipio
+
+0480 Asheville, NC MSA
+0480 37021 1 Buncombe County
+
+0500 Athens, GA MSA
+0500 13059 1 Clarke County
+0500 13157 2 Jackson County
+0500 13195 2 Madison County
+0500 13219 2 Oconee County
+
+0520 Atlanta, GA MSA
+0520 13013 2 Barrow County
+0520 13035 2 Butts County
+0520 13057 2 Cherokee County
+0520 13063 1 Clayton County
+0520 13067 1 Cobb County
+0520 13077 2 Coweta County
+0520 13089 1 De Kalb County
+0520 13097 1 Douglas County
+0520 13113 2 Fayette County
+0520 13117 2 Forsyth County
+0520 13121 1 Fulton County
+0520 13135 1 Gwinnett County
+0520 13151 2 Henry County
+0520 13217 2 Newton County
+0520 13223 2 Paulding County
+0520 13247 2 Rockdale County
+0520 13255 2 Spalding County
+0520 13297 2 Walton County
+
+0560 Atlantic City, NJ MSA
+0560 34001 1 Atlantic County
+0560 34009 2 Cape May County
+
+0600 Augusta, GA-SC MSA
+0600 13073 1 Columbia County, GA
+0600 13189 2 McDuffie County, GA
+0600 13245 1 Richmond County, GA
+0600 45003 1 Aiken County, SC
+
+0640 Austin, TX MSA
+0640 48209 2 Hays County
+0640 48453 1 Travis County
+0640 48491 2 Williamson County
+
+0680 Bakersfield, CA MSA
+0680 06029 1 Kern County
+
+0720 Baltimore, MD MSA
+0720 24003 1 Anne Arundel County
+0720 24510 1 Baltimore city
+0720 24005 1 Baltimore County
+0720 24013 2 Carroll County
+0720 24025 2 Harford County
+0720 24027 1 Howard County
+0720 24035 2 Queen Anne's County
+
+0730 Bangor, ME MSA
+0730 23019 Penobscot County (pt.)
+0730 23019 1 02795 Bangor city
+0730 23019 1 06925 Brewer city
+0730 23019 2 22535 Eddington town
+0730 23019 2 27645 Glenburn town
+0730 23019 2 30795 Hampden town
+0730 23019 2 32510 Hermon town
+0730 23019 2 33490 Holden town
+0730 23019 2 36325 Kenduskeag town
+0730 23019 1 55225 Old Town city
+0730 23019 1 55540 Orono town
+0730 23019 2 55680 Orrington town
+0730 23019 2 57937 Penobscot Indian Island Indian Reservation
+0730 23019 1 78780 Veazie town
+0730 23027 Waldo County (pt.)
+0730 23027 2 86760 Winterport town
+
+0760 Baton Rouge, LA MSA
+0760 22005 2 Ascension Parish
+0760 22033 1 East Baton Rouge Parish
+0760 22063 2 Livingston Parish
+0760 22121 2 West Baton Rouge Parish
+
+0780 Battle Creek, MI MSA
+0780 26025 1 Calhoun County
+
+0840 Beaumont-Port Arthur, TX MSA
+0840 48199 2 Hardin County
+0840 48245 1 Jefferson County
+0840 48361 2 Orange County
+
+0860 Bellingham, WA MSA
+0860 53073 1 Whatcom County
+
+0870 Benton Harbor, MI MSA
+0870 26021 1 Berrien County
+
+0880 Billings, MT MSA
+0880 30111 1 Yellowstone County
+
+0920 Biloxi-Gulfport, MS MSA
+0920 28045 2 Hancock County
+0920 28047 1 Harrison County
+
+0960 Binghamton, NY MSA
+0960 36007 1 Broome County
+0960 36107 2 Tioga County
+
+1000 Birmingham, AL MSA
+1000 01009 2 Blount County
+1000 01073 1 Jefferson County
+1000 01117 2 Shelby County
+1000 01115 2 St. Clair County
+1000 01127 2 Walker County
+
+1010 Bismarck, ND MSA
+1010 38015 1 Burleigh County
+1010 38059 1 Morton County
+
+1020 Bloomington, IN MSA
+1020 18105 1 Monroe County
+
+1040 Bloomington-Normal, IL MSA
+1040 17113 1 McLean County
+
+1080 Boise City, ID MSA
+1080 16001 1 Ada County
+
+1122 07 Boston-Lawrence-Salem, MA-NH CMSA
+1122 1120 07 Boston, MA PMSA
+1122 1120 07 25005 Bristol County (pt.)
+1122 1120 07 25005 2 38225 Mansfield town
+1122 1120 07 25005 2 49970 Norton town
+1122 1120 07 25005 2 56060 Raynham tow
+1122 1120 07 25009 Essex County (pt.)
+1122 1120 07 25009 1 37490 Lynn city
+1122 1120 07 25009 1 37560 Lynnfield town
+1122 1120 07 25009 1 43580 Nahant town
+1122 1120 07 25009 1 60015 Saugus town
+1122 1120 07 25017 Middlesex County (pt.)
+1122 1120 07 25017 1 00380 Acton town
+1122 1120 07 25017 1 01605 Arlington town
+1122 1120 07 25017 1 02130 Ashland town
+1122 1120 07 25017 2 03005 Ayer town
+1122 1120 07 25017 1 04615 Bedford town
+1122 1120 07 25017 1 05070 Belmont town
+1122 1120 07 25017 2 07350 Boxborough town
+1122 1120 07 25017 1 09840 Burlington town
+1122 1120 07 25017 1 11000 Cambridge city
+1122 1120 07 25017 2 11525 Carlisle town
+1122 1120 07 25017 1 15060 Concord town
+1122 1120 07 25017 1 21990 Everett city
+1122 1120 07 25017 1 24925 Framingham town
+1122 1120 07 25017 2 27480 Groton town
+1122 1120 07 25017 1 30700 Holliston town
+1122 1120 07 25017 2 31085 Hopkinton town
+1122 1120 07 25017 1 31540 Hudson town
+1122 1120 07 25017 1 35215 Lexington town
+1122 1120 07 25017 1 35425 Lincoln town
+1122 1120 07 25017 2 35950 Littleton town
+1122 1120 07 25017 1 37875 Malden city
+1122 1120 07 25017 1 38715 Marlborough city
+1122 1120 07 25017 1 39625 Maynard town
+1122 1120 07 25017 1 39835 Medford city
+1122 1120 07 25017 1 40115 Melrose city
+1122 1120 07 25017 1 43895 Natick town
+1122 1120 07 25017 1 45560 Newton city
+1122 1120 07 25017 1 48955 North Reading town
+1122 1120 07 25017 1 56130 Reading town
+1122 1120 07 25017 2 61380 Sherborn town
+1122 1120 07 25017 2 61590 Shirley town
+1122 1120 07 25017 1 62535 Somerville city
+1122 1120 07 25017 1 67665 Stoneham town
+1122 1120 07 25017 2 68050 Stow town
+1122 1120 07 25017 1 68260 Sudbury town
+1122 1120 07 25017 2 70360 Townsend town
+1122 1120 07 25017 1 72215 Wakefield town
+1122 1120 07 25017 1 72600 Waltham city
+1122 1120 07 25017 1 73405 Watertown town
+1122 1120 07 25017 1 73790 Wayland town
+1122 1120 07 25017 1 77255 Weston town
+1122 1120 07 25017 1 80230 Wilmington town
+1122 1120 07 25017 1 80510 Winchester town
+1122 1120 07 25017 1 81035 Woburn city
+1122 1120 07 25021 Norfolk County (pt.)
+1122 1120 07 25021 2 04930 Bellingham town
+1122 1120 07 25021 1 07665 Braintree town
+1122 1120 07 25021 1 09175 Brookline town
+1122 1120 07 25021 1 11315 Canton town
+1122 1120 07 25021 1 14640 Cohasset town
+1122 1120 07 25021 1 16495 Dedham town
+1122 1120 07 25021 2 17405 Dover town
+1122 1120 07 25021 1 24820 Foxborough town
+1122 1120 07 25021 1 25065 Franklin town
+1122 1120 07 25021 1 30455 Holbrook town
+1122 1120 07 25021 1 39765 Medfield town
+1122 1120 07 25021 1 39975 Medway town
+1122 1120 07 25021 2 41515 Millis town
+1122 1120 07 25021 1 41690 Milton town
+1122 1120 07 25021 1 44105 Needham town
+1122 1120 07 25021 2 46050 Norfolk town
+1122 1120 07 25021 1 50250 Norwood town
+1122 1120 07 25021 1 55745 Quincy city
+1122 1120 07 25021 1 55955 Randolph town
+1122 1120 07 25021 1 60785 Sharon town
+1122 1120 07 25021 1 67945 Stoughton town
+1122 1120 07 25021 1 72495 Walpole town
+1122 1120 07 25021 1 74175 Wellesley town
+1122 1120 07 25021 1 78690 Westwood town
+1122 1120 07 25021 1 78865 Weymouth town
+1122 1120 07 25021 2 82315 Wrentham town
+1122 1120 07 25023 Plymouth County (pt.)
+1122 1120 07 25023 2 11665 Carver town
+1122 1120 07 25023 2 17895 Duxbury town
+1122 1120 07 25023 1 28285 Hanover town
+1122 1120 07 25023 2 28495 Hanson town
+1122 1120 07 25023 1 30210 Hingham town
+1122 1120 07 25023 1 31645 Hull town
+1122 1120 07 25023 2 33220 Kingston town
+1122 1120 07 25023 2 33920 Lakeville town
+1122 1120 07 25023 2 38855 Marshfield town
+1122 1120 07 25023 2 40850 Middleborough town
+1122 1120 07 25023 2 50145 Norwell town
+1122 1120 07 25023 2 52630 Pembroke town
+1122 1120 07 25023 2 54310 Plymouth town
+1122 1120 07 25023 2 54415 Plympton town
+1122 1120 07 25023 1 57775 Rockland town
+1122 1120 07 25023 1 60330 Scituate town
+1122 1120 07 25025 Suffolk County
+1122 1120 07 25025 1 07000 Boston city
+1122 1120 07 25025 1 13205 Chelsea city
+1122 1120 07 25025 1 56585 Revere city
+1122 1120 07 25025 1 80930 Winthrop town
+1122 1120 07 25027 Worcester County (pt.)
+1122 1120 07 25027 2 05490 Berlin town
+1122 1120 07 25027 2 06365 Bolton town
+1122 1120 07 25027 2 28950 Harvard town
+1122 1120 07 25027 2 30945 Hopedale town
+1122 1120 07 25027 2 34165 Lancaster town
+1122 1120 07 25027 2 40255 Mendon town
+1122 1120 07 25027 2 41165 Milford town
+1122 1120 07 25027 2 63165 Southborough town
+1122 1120 07 25027 2 71480 Upton town
+1122 1200 07 Brockton, MA PMSA
+1122 1200 07 25005 Bristol County (pt.)
+1122 1200 07 25005 1 20100 Easton town
+1122 1200 07 25021 Norfolk County (pt.)
+1122 1200 07 25021 1 02935 Avon town
+1122 1200 07 25023 Plymouth County (pt.)
+1122 1200 07 25023 1 00170 Abington town
+1122 1200 07 25023 2 08085 Bridgewater town
+1122 1200 07 25023 1 09000 Brockton city
+1122 1200 07 25023 2 18455 East Bridgewater town
+1122 1200 07 25023 2 27795 Halifax town
+1122 1200 07 25023 1 75260 West Bridgewater town
+1122 1200 07 25023 1 79530 Whitman town
+1122 4160 07 Lawrence-Haverhill, MA-NH PMSA
+1122 4160 07 25009 Essex County, MA (pt.)
+1122 4160 07 25009 2 01185 Amesbury town
+1122 4160 07 25009 1 01465 Andover town
+1122 4160 07 25009 2 07420 Boxford town
+1122 4160 07 25009 2 25625 Georgetown town
+1122 4160 07 25009 1 27620 Groveland town
+1122 4160 07 25009 2 25625 Haverhill city
+1122 4160 07 25009 1 34550 Lawrence city
+1122 4160 07 25009 1 40430 Merrimac town
+1122 4160 07 25009 1 40675 Methuen town
+1122 4160 07 25009 2 45175 Newbury town
+1122 4160 07 25009 2 45245 Newburyport city
+1122 4160 07 25009 1 46365 North Andover town
+1122 4160 07 25009 2 59245 Salisbury town
+1122 4160 07 25009 2 77150 West Newbury town
+1122 4160 07 33015 Rockingham County, NH (pt.)
+1122 4160 07 33015 2 02340 Atkinson town
+1122 4160 07 33015 2 07220 Brentwood town
+1122 4160 07 33015 2 17140 Danville town
+1122 4160 07 33015 2 17940 Derry town
+1122 4160 07 33015 2 21380 East Kingston town
+1122 4160 07 33015 2 32900 Hampstead town
+1122 4160 07 33015 2 40100 Kingston town
+1122 4160 07 33015 2 52900 Newton town
+1122 4160 07 33015 2 62500 Plaistow town
+1122 4160 07 33015 1 66660 Salem town
+1122 4160 07 33015 2 67620 Sandown town
+1122 4160 07 33015 2 68260 Seabrook town
+1122 4160 07 33015 2 85780 Windham town
+1122 4560 07 Lowell, MA-NH PMSA
+1122 4560 07 25017 Middlesex County, MA (pt.)
+1122 4560 07 25017 1 05805 Billerica town
+1122 4560 07 25017 1 13135 Chelmsford town
+1122 4560 07 25017 1 17475 Dracut town
+1122 4560 07 25017 2 17825 Dunstable town
+1122 4560 07 25017 1 37000 Lowell city
+1122 4560 07 25017 2 52805 Pepperell town
+1122 4560 07 25017 1 69415 Tewksbury town
+1122 4560 07 25017 2 71025 Tyngsborough town
+1122 4560 07 25017 2 76135 Westford town
+1122 4560 07 33011 Hillsborough County, NH (pt.)
+1122 4560 07 33011 2 59940 Pelham town
+1122 5350 07 Nashua, NH PMSA
+1122 5350 07 33011 Hillsborough County (pt.)
+1122 5350 07 33011 2 01300 Amherst town
+1122 5350 07 33011 2 08100 Brookline town
+1122 5350 07 33011 2 37140 Hollis town
+1122 5350 07 33011 1 37940 Hudson town
+1122 5350 07 33011 2 42260 Litchfield town
+1122 5350 07 33011 2 47540 Merrimack town
+1122 5350 07 33011 2 48020 Milford town
+1122 5350 07 33011 2 49140 Mont Vernon town
+1122 5350 07 33011 1 50260 Nashua city
+1122 5350 07 33011 2 85220 Wilton town
+1122 5350 07 33015 Rockingham County (pt.)
+1122 5350 07 33015 2 43220 Londonderry town
+1122 7090 07 Salem-Gloucester, MA PMSA
+1122 7090 07 25009 Essex County (pt.)
+1122 7090 07 25009 1 05595 Beverly city
+1122 7090 07 25009 1 16250 Danvers town
+1122 7090 07 25009 2 21850 Essex town
+1122 7090 07 25009 2 26150 Gloucester city
+1122 7090 07 25009 1 27900 Hamilton town
+1122 7090 07 25009 2 32310 Ipswich town
+1122 7090 07 25009 1 37945 Manchester town
+1122 7090 07 25009 1 38400 Marblehead town
+1122 7090 07 25009 2 41095 Middleton town
+1122 7090 07 25009 1 52490 Peabody city
+1122 7090 07 25009 2 57880 Rockport town
+1122 7090 07 25009 2 58405 Rowley town
+1122 7090 07 25009 1 59105 Salem city
+1122 7090 07 25009 1 68645 Swampscott town
+1122 7090 07 25009 2 70150 Topsfield town
+1122 7090 07 25009 2 74595 Wenham town
+
+1140 Bradenton, FL MSA
+1140 12081 1 Manatee County
+
+1150 Bremerton, WA MSA
+1150 53035 1 Kitsap County
+
+1240 Brownsville-Harlingen, TX MSA
+1240 48061 1 Cameron County
+
+1260 Bryan-College Station, TX MSA
+1260 48041 1 Brazos County
+
+1282 10 Buffalo-Niagara Falls, NY CMSA
+1282 1280 10 Buffalo, NY PMSA
+1282 1280 10 36029 1 Erie County
+1282 5700 10 Niagara Falls, NY PMSA
+1282 5700 10 36063 1 Niagara County
+
+1300 Burlington, NC MSA
+1300 37001 1 Alamance County
+
+1305 Burlington, VT MSA
+1305 50007 Chittenden County (pt.)
+1305 50007 1 10675 Burlington city
+1305 50007 2 13300 Charlotte town
+1305 50007 1 14875 Colchester town
+1305 50007 1 24175 Essex town
+1305 50007 2 33475 Hinesburg town
+1305 50007 2 36700 Jericho town
+1305 50007 2 45250 Milton town
+1305 50007 2 59275 Richmond town
+1305 50007 2 62050 St. George town
+1305 50007 2 64300 Shelburne town
+1305 50007 1 66175 South Burlington city
+1305 50007 2 84475 Williston town
+1305 50007 1 85150 Winooski city
+1305 50011 Franklin County (pt.)
+1305 50011 2 27700 Georgia town
+1305 50013 Grand Isle County (pt.)
+1305 50013 2 29275 Grand Isle town
+1305 50013 2 67000 South Hero town
+
+1320 Canton, OH MSA
+1320 39019 2 Carroll County
+1320 39151 1 Stark County
+
+1350 Casper, WY MSA
+1350 56025 1 Natrona County
+
+1360 Cedar Rapids, IA MSA
+1360 19113 1 Linn County
+
+1400 Champaign-Urbana-Rantoul, IL MSA
+1400 17019 1 Champaign County
+
+1440 Charleston, SC MSA
+1440 45015 1 Berkeley County
+1440 45019 1 Charleston County
+1440 45035 1 Dorchester County
+
+1480 Charleston, WV MSA
+1480 54039 1 Kanawha County
+1480 54079 2 Putnam County
+
+1520 Charlotte-Gastonia-Rock Hill, NC-SC MSA
+1520 37025 1 Cabarrus County, NC
+1520 37071 1 Gaston County, NC
+1520 37109 2 Lincoln County, NC
+1520 37119 1 Mecklenburg County, NC
+1520 37159 2 Rowan County, NC
+1520 37179 2 Union County, NC
+1520 45091 1 York County, SC
+
+1540 Charlottesville, VA MSA
+1540 51003 1 Albemarle County
+1540 51540 1 Charlottesville city
+1540 51065 2 Fluvanna County
+1540 51079 2 Greene County
+
+1560 Chattanooga, TN-GA MSA
+1560 13047 2 Catoosa County, GA
+1560 13083 2 Dade County, GA
+1560 13295 2 Walker County, GA
+1560 47065 1 Hamilton County, TN
+1560 47115 2 Marion County, TN
+1560 47153 2 Sequatchie County, TN
+
+1580 Cheyenne, WY MSA
+1580 56021 1 Laramie County
+
+1602 14 Chicago-Gary-Lake County, IL-IN-WI CMSA
+1602 0620 14 Aurora-Elgin, IL PMSA
+1602 0620 14 17089 1 Kane County
+1602 0620 14 17093 2 Kendall County
+1602 1600 14 Chicago, IL PMSA
+1602 1600 14 17031 1 Cook County
+1602 1600 14 17043 1 Du Page County
+1602 1600 14 17111 2 McHenry County
+1602 2960 14 Gary-Hammond, IN PMSA
+1602 2960 14 18089 1 Lake County
+1602 2960 14 18127 2 Porter County
+1602 3690 14 Joliet, IL PMSA
+1602 3690 14 17063 2 Grundy County
+1602 3690 14 17197 1 Will County
+1602 3800 14 Kenosha, WI PMSA
+1602 3800 14 55059 1 Kenosha County
+1602 3965 14 Lake County, IL PMSA
+1602 3965 14 17097 1 Lake County
+
+1620 Chico, CA MSA
+1620 06007 1 Butte County
+
+1642 21 Cincinnati-Hamilton, OH-KY-IN CMSA
+1642 1640 21 Cincinnati, OH-KY-IN PMSA
+1642 1640 21 18029 2 Dearborn County, IN
+1642 1640 21 21015 2 Boone County, KY
+1642 1640 21 21037 1 Campbell County, KY
+1642 1640 21 21117 1 Kenton County, KY
+1642 1640 21 39025 2 Clermont County, OH
+1642 1640 21 39061 1 Hamilton County, OH
+1642 1640 21 39165 2 Warren County, OH
+1642 3200 21 Hamilton-Middletown, OH PMSA
+1642 3200 21 39017 1 Butler County
+
+1660 Clarksville-Hopkinsville, TN-KY MSA
+1660 21047 2 Christian County, KY
+1660 47125 1 Montgomery County, TN
+
+1692 28 Cleveland-Akron-Lorain, OH CMSA
+1692 0080 28 Akron, OH PMSA
+1692 0080 28 39133 1 Portage County
+1692 0080 28 39153 1 Summit County
+1692 1680 28 Cleveland, OH PMSA
+1692 1680 28 39035 1 Cuyahoga County
+1692 1680 28 39055 2 Geauga County
+1692 1680 28 39085 1 Lake County
+1692 1680 28 39103 2 Medina County
+1692 4440 28 Lorain-Elyria, OH PMSA
+1692 4440 28 39093 1 Lorain County
+
+1720 Colorado Springs, CO MSA
+1720 08041 1 El Paso County
+
+1740 Columbia, MO MSA
+1740 29019 1 Boone County
+
+1760 Columbia, SC MSA
+1760 45063 1 Lexington County
+1760 45079 1 Richland County
+
+1800 Columbus, GA-AL MSA
+1800 01113 1 Russell County, AL
+1800 13053 1 Chattahoochee County, GA
+1800 13215 1 Muscogee County, GA
+
+1840 Columbus, OH MSA
+1840 39041 2 Delaware County
+1840 39045 2 Fairfield County
+1840 39049 1 Franklin County
+1840 39089 1 Licking County
+1840 39097 2 Madison County
+1840 39129 2 Pickaway County
+1840 39159 2 Union County
+
+1880 Corpus Christi, TX MSA
+1880 48355 1 Nueces County
+1880 48409 2 San Patricio County
+
+1900 Cumberland, MD-WV MSA
+1900 24001 1 Allegany County, MD
+1900 54057 2 Mineral County, WV
+
+1922 31 Dallas-Fort Worth, TX CMSA
+1922 1920 31 Dallas, TX PMSA
+1922 1920 31 48085 1 Collin County
+1922 1920 31 48113 1 Dallas County
+1922 1920 31 48121 2 Denton County
+1922 1920 31 48139 2 EllisCounty
+1922 1920 31 48257 2 Kaufman County
+1922 1920 31 48397 2 Rockwall County
+1922 2800 31 Fort Worth-Arlington, TX PMSA
+1922 2800 31 48251 2 Johnson County
+1922 2800 31 48367 2 Parker County
+1922 2800 31 48439 1 Tarrant County
+
+1950 Danville, VA MSA
+1950 51590 1 Danville city
+1950 51143 1 Pittsylvania County
+
+1960 Davenport-Rock Island-Moline, IA-IL MSA
+1960 19163 1 Scott County, IA
+1960 17073 2 Henry County, IL
+1960 17161 1 Rock Island County, IL
+
+2000 Dayton-Springfield, OH MSA
+2000 39023 1 Clark County
+2000 39057 1 Greene County
+2000 39109 2 Miami County
+2000 39113 1 Montgomery County
+
+2020 Daytona Beach, FL MSA
+2020 12127 1 Volusia County
+
+2030 Decatur, AL MSA
+2030 01079 2 Lawrence County
+2030 01103 1 Morgan County
+
+2040 Decatur, IL MSA
+2040 17115 1 Macon County
+
+2082 34 Denver-Boulder, CO CMSA
+2082 1125 34 Boulder-Longmont, CO PMSA
+2082 1125 34 08013 1 Boulder County
+2082 2080 34 Denver, CO PMSA
+2082 2080 34 08001 1 Adams County
+2082 2080 34 08005 1 Arapahoe County
+2082 2080 34 08031 1 Denver County
+2082 2080 34 08035 2 Douglas County
+2082 2080 34 08059 1 Jefferson County
+
+2120 Des Moines, IA MSA
+2120 19049 2 Dallas County
+2120 19153 1 Polk County
+2120 19181 2 Warren County
+
+2162 35 Detroit-Ann Arbor, MI CMSA
+2162 0440 35 Ann Arbor, MI PMSA
+2162 0440 35 26161 1 Washtenaw County
+2162 2160 35 Detroit, MI PMSA
+2162 2160 35 26087 2 Lapeer County
+2162 2160 35 26093 2 Livingston County
+2162 2160 35 26099 1 Macomb County
+2162 2160 35 26115 2 Monroe County
+2162 2160 35 26125 1 Oakland County
+2162 2160 35 26147 1 St.Clair County
+2162 2160 35 26163 1 Wayne County
+
+2180 Dothan, AL MSA
+2180 01045 2 Dale County
+2180 01069 1 Houston County
+
+2200 Dubuque, IA MSA
+2200 19061 1 Dubuque County
+
+2240 Duluth, MN-WI MSA
+2240 27137 1 St.Louis County, MN
+2240 55031 1 Douglas County, WI
+
+2290 Eau Claire, WI MSA
+2290 55017 2 Chippewa County
+2290 55035 1 Eau Claire County
+
+2320 El Paso, TX MSA
+2320 48141 1 El Paso County
+
+2330 Elkhart-Goshen, IN MSA
+2330 18039 1 Elkhart County
+
+2335 Elmira, NY MSA
+2335 36015 1 Chemung County
+
+2340 Enid, OK MSA
+2340 40047 1 Garfield County
+
+2360 Erie, PA MSA
+2360 42049 1 Erie County
+
+2400 Eugene-Springfield, OR MSA
+2400 41039 1 Lane County
+
+2440 Evansville, IN-KY MSA
+2440 18129 2 Posey County, IN
+2440 18163 1 Vanderburgh County, IN
+2440 18173 2 Warrick County, IN
+2440 21101 1 Henderson County, KY
+
+2520 Fargo-Moorhead, ND-MN MSA
+2520 27027 1 Clay County, MN
+2520 38017 1 Cass County, ND
+
+2560 Fayetteville, NC MSA
+2560 37051 1 Cumberland County
+
+2580 Fayetteville-Springdale, AR MSA
+2580 05143 1 Washington County
+
+2600 Fitchburg-Leominster, MA MSA
+2600 25017 Middlesex County (pt.)
+2600 25017 2 01955 Ashby town
+2600 25027 Worcester County (pt.)
+2600 25027 2 01885 Ashburnham town
+2600 25027 1 23875 Fitchburg city
+2600 25027 1 35075 Leominster city
+2600 25027 2 37420 Lunenburg town
+2600 25027 2 77010 Westminster town
+
+2640 Flint, MI MSA
+2640 26049 1 Genesee County
+
+2650 Florence, AL MSA
+2650 01033 1 Colbert County
+2650 01077 1 Lauderdale County
+
+2655 Florence, SC MSA
+2655 45041 1 Florence County
+
+2670 Fort Collins-Loveland, CO MSA
+2670 08069 1 Larimer County
+
+2700 Fort Myers-Cape Coral, FL MSA
+2700 12071 1 Lee County
+
+2710 Fort Pierce, FL MSA
+2710 12085 2 Martin County
+2710 12111 1 St.Lucie County
+
+2720 Fort Smith, AR-OK MSA
+2720 05033 2 Crawford County, AR
+2720 05131 1 Sebastian County, AR
+2720 40135 2 Sequoyah County, OK
+
+2750 Fort Walton Beach, FL MSA
+2750 12091 1 Okaloosa County
+
+2760 Fort Wayne, IN MSA
+2760 18003 1 Allen County
+2760 18033 2 De Kalb County
+2760 18183 2 Whitley County
+
+2840 Fresno, CA MSA
+2840 06019 1 Fresno County
+
+2880 Gadsden, AL MSA
+2880 01055 1 Etowah County
+
+2900 Gainesville, FL MSA
+2900 12001 1 Alachua County
+2900 12007 2 Bradford County
+
+2975 Glens Falls, NY MSA
+2975 36113 1 Warren County
+2975 36115 2 Washington County
+
+2985 Grand Forks, ND MSA
+2985 38035 1 Grand Forks County
+
+3000 Grand Rapids, MI MSA
+3000 26081 1 Kent County
+3000 26139 2 Ottawa County
+
+3040 Great Falls, MT MSA
+3040 30013 1 Cascade County
+
+3060 Greeley, CO MSA
+3060 08123 1 Weld County
+
+3080 Green Bay, WI MSA
+3080 55009 1 Brown County
+
+3120 Greensboro--Winston-Salem--High Point, NC MSA
+3120 37057 2 Davidson County
+3120 37059 2 Davie County
+3120 37067 1 Forsyth County
+3120 37081 1 Guilford County
+3120 37151 2 Randolph County
+3120 37169 2 Stokes County
+3120 37197 2 Yadkin County
+
+3160 Greenville-Spartanburg, SC MSA
+3160 45045 1 Greenville County
+3160 45077 2 Pickens County
+3160 45083 1 Spartanburg County
+
+3180 Hagerstown, MD MSA
+3180 24043 1 Washington County
+
+3240 Harrisburg-Lebanon-Carlisle, PA MSA
+3240 42041 2 Cumberland County
+3240 42043 1 Dauphin County
+3240 42075 2 Lebanon County
+3240 42099 2 Perry County
+
+3282 41 Hartford-New Britain-Middletown, CT CMSA
+3282 1170 41 Bristol, CT PMSA
+3282 1170 41 09003 Hartford County (pt.)
+3282 1170 41 09003 1 08490 Bristol town
+3282 1170 41 09003 2 10100 Burlington town
+3282 1170 41 09005 Litchfield County (pt.)
+3282 1170 41 09005 1 60750 Plymouth town
+3282 3280 41 Hartford, CT PMSA
+3282 3280 41 09003 Hartford County (pt.)
+3282 3280 41 09003 1 02060 Avon town
+3282 3280 41 09003 1 05910 Bloomfield town
+3282 3280 41 09003 2 12270 Canton town
+3282 3280 41 09003 2 22070 East Granby town
+3282 3280 41 09003 1 22630 East Hartford town
+3282 3280 41 09003 2 24800 East Windsor town
+3282 3280 41 09003 2 25990 Enfield town
+3282 3280 41 09003 1 27600 Farmington town
+3282 3280 41 09003 1 31240 Glastonbury town
+3282 3280 41 09003 2 32640 Granby town
+3282 3280 41 09003 1 37070 Hartford town
+3282 3280 41 09003 1 44700 Manchester town
+3282 3280 41 09003 2 45820 Marlborough town
+3282 3280 41 09003 1 52140 Newington town
+3282 3280 41 09003 1 65370 Rocky Hill town
+3282 3280 41 09003 2 68940 Simsbury town
+3282 3280 41 09003 1 71390 South Windsor town
+3282 3280 41 09003 2 74540 Suffield town
+3282 3280 41 09003 1 82590 West Hartford town
+3282 3280 41 09003 1 84900 Wethersfield town
+3282 3280 41 09003 1 87000 Windsor town
+3282 3280 41 09003 2 87070 Windsor Locks town
+3282 3280 41 09005 Litchfield County (pt.)
+3282 3280 41 09005 2 02760 Barkhamsted town
+3282 3280 41 09005 2 51350 New Hartford town
+3282 3280 41 09007 Middlesex County (pt.)
+3282 3280 41 09007 2 22280 East Haddam town
+3282 3280 41 09011 New London County (pt.)
+3282 3280 41 09011 2 15910 Colchester town
+3282 3280 41 09013 Tolland County (pt.)
+3282 3280 41 09013 2 01080 Andover town
+3282 3280 41 09013 2 06260 Bolton town
+3282 3280 41 09013 2 16400 Columbia town
+3282 3280 41 09013 2 17800 Coventry town
+3282 3280 41 09013 2 25360 Ellington town
+3282 3280 41 09013 2 37910 Hebron town
+3282 3280 41 09013 2 69220 Somers town
+3282 3280 41 09013 2 72090 Stafford town
+3282 3280 41 09013 2 76290 Tolland town
+3282 3280 41 09013 1 78250 Vernon town
+3282 3280 41 09013 2 85950 Willington town
+3282 5020 41 Middletown, CT PMSA
+3282 5020 41 09007 Middlesex County (pt.)
+3282 5020 41 09007 1 18080 Cromwell town
+3282 5020 41 09007 2 20810 Durham town
+3282 5020 41 09007 2 22490 East Hampton town
+3282 5020 41 09007 2 35230 Haddam town
+3282 5020 41 09007 2 47080 Middlefield town
+3282 5020 41 09007 1 47360 Middletown town
+3282 5020 41 09007 1 61800 Portland town
+3282 5440 41 New Britain, CT PMSA
+3282 5440 41 09003 Hartford County (pt.)
+3282 5440 41 09003 1 04300 Berlin town
+3282 5440 41 09003 1 50440 New Britain town
+3282 5440 41 09003 1 60120 Plainville town
+3282 5440 41 09003 1 70550 Southington town
+
+3290 Hickory-Morganton, NC MSA
+3290 37003 2 Alexander County
+3290 37023 2 Burke County
+3290 37035 1 Catawba County
+
+3320 Honolulu, HI MSA
+3320 15003 1 Honolulu County
+
+3350 Houma-Thibodaux, LA MSA
+3350 22057 2 Lafourche Parish
+3350 22109 1 Terrebonne Parish
+
+3362 42 Houston-Galveston-Brazoria, TX CMSA
+3362 1145 42 Brazoria, TX PMSA
+3362 1145 42 48039 2 Brazoria County
+3362 2920 42 Galveston-Texas City, TX PMSA
+3362 2920 42 48167 1 Galveston County
+3362 3360 42 Houston, TX PMSA
+3362 3360 42 48157 1 Fort Bend County
+3362 3360 42 48201 1 Harris County
+3362 3360 42 48291 2 Liberty County
+3362 3360 42 48339 2 Montgomery County
+3362 3360 42 48473 2 Waller County
+
+3400 Huntington-Ashland, WV-KY-OH MSA
+3400 21019 1 Boyd County, KY
+3400 21043 2 Carter County, KY
+3400 21089 2 Greenup County, KY
+3400 39087 1 Lawrence County, OH
+3400 54011 1 Cabell County, WV
+3400 54099 1 Wayne County, WV
+
+3440 Huntsville, AL MSA
+3440 01089 1 Madison County
+
+3480 Indianapolis, IN MSA
+3480 18011 2 Boone County
+3480 18057 2 Hamilton County
+3480 18059 2 Hancock County
+3480 18063 2 Hendricks County
+3480 18081 2 Johnson County
+3480 18097 1 Marion County
+3480 18109 2 Morgan County
+3480 18145 2 Shelby County
+
+3500 Iowa City, IA MSA
+3500 19103 1 Johnson County
+
+3520 Jackson, MI MSA
+3520 26075 1 Jackson County
+
+3560 Jackson, MS MSA
+3560 28049 1 Hinds County
+3560 28089 2 Madison County
+3560 28121 1 Rankin County
+
+3580 Jackson, TN MSA
+3580 47113 1 Madison County
+
+3600 Jacksonville, FL MSA
+3600 12019 1 Clay County
+3600 12031 1 Duval County
+3600 12089 2 Nassau County
+3600 12109 2 St. Johns County
+
+3605 Jacksonville, NC MSA
+3605 37133 1 Onslow County
+
+3610 Jamestown-Dunkirk, NY MSA
+3610 36013 1 Chautauqua County
+
+3620 Janesville-Beloit, WI MSA
+3620 55105 1 Rock County
+
+3660 Johnson City-Kingsport-Bristol, TN-VA MSA
+3660 47019 1 Carter County, TN
+3660 47073 2 Hawkins County, TN
+3660 47163 1 Sullivan County, TN
+3660 47171 2 Unicoi County, TN
+3660 47179 1 Washington County, TN
+3660 51520 1 Bristol city, VA
+3660 51169 2 Scott County, VA
+3660 51191 1 Washington County, VA
+
+3680 Johnstown, PA MSA
+3680 42021 1 Cambria County
+3680 42111 2 Somerset County
+
+3710 Joplin, MO MSA
+3710 29097 1 Jasper County
+3710 29145 2 Newton County
+
+3720 Kalamazoo, MI MSA
+3720 26077 1 Kalamazoo County
+
+3740 Kankakee, IL MSA
+3740 17091 1 Kankakee County
+
+3760 Kansas City, MO-KS MSA
+3760 20091 1 Johnson County, KS
+3760 20103 2 Leavenworth County, KS
+3760 20121 2 Miami County, KS
+3760 20209 1 Wyandotte County, KS
+3760 29037 2 Cass County, MO
+3760 29047 1 Clay County, MO
+3760 29095 1 Jackson County, MO
+3760 29107 2 Lafayette County, MO
+3760 29165 1 Platte County, MO
+3760 29177 2 Ray County, MO
+
+3810 Killeen-Temple, TX MSA
+3810 48027 1 Bell County
+3810 48099 2 Coryell County
+
+3840 Knoxville, TN MSA
+3840 47001 2 Anderson County
+3840 47009 1 Blount County
+3840 47057 2 Grainger County
+3840 47089 2 Jefferson County
+3840 47093 1 Knox County
+3840 47155 2 Sevier County
+3840 47173 2 Union County
+
+3850 Kokomo, IN MSA
+3850 18067 1 Howard County
+3850 18159 2 Tipton County
+
+3870 La Crosse, WI MSA
+3870 55063 1 La Crosse County
+
+3880 Lafayette, LA MSA
+3880 22055 1 Lafayette Parish
+3880 22099 2 St. Martin Parish
+
+3920 Lafayette-West Lafayette, IN MSA
+3920 18157 1 Tippecanoe County
+
+3960 Lake Charles, LA MSA
+3960 22019 1 Calcasieu Parish
+
+3980 Lakeland-Winter Haven, FL MSA
+3980 12105 1 Polk County
+
+4000 Lancaster, PA MSA
+4000 42071 1 Lancaster County
+
+4040 Lansing-East Lansing, MI MSA
+4040 26037 2 Clinton County
+4040 26045 1 Eaton County
+4040 26065 1 Ingham County
+
+4080 Laredo, TX MSA
+4080 48479 1 Webb County
+
+4100 Las Cruces, NM MSA
+4100 35013 1 Dona Ana County
+
+4120 Las Vegas, NV MSA
+4120 32003 1 Clark County
+
+4150 Lawrence, KS MSA
+4150 20045 1 Douglas County
+
+4200 Lawton, OK MSA
+4200 40031 1 Comanche County
+
+4240 Lewiston-Auburn, ME MSA
+4240 23001 Androscoggin County (pt.)
+4240 23001 1 02060 Auburn city
+4240 23001 2 29255 Greene town
+4240 23001 1 38740 Lewiston city
+4240 23001 1 40035 Lisbon town
+4240 23001 2 44585 Mechanic Falls town
+4240 23001 2 60020 Poland town
+4240 23001 2 64570 Sabattus town
+
+4280 Lexington-Fayette, KY MSA
+4280 21017 2 Bourbon County
+4280 21049 2 Clark County
+4280 21067 1 Fayette County
+4280 21113 2 Jessamine County
+4280 21209 2 Scott County
+4280 21239 2 Woodford County
+
+4320 Lima, OH MSA
+4320 39003 1 Allen County
+4320 39011 2 Auglaize County
+
+4360 Lincoln, NE MSA
+4360 31109 1 Lancaster County
+
+4400 Little Rock-North Little Rock, AR MSA
+4400 05045 2 Faulkner County
+4400 05085 2 Lonoke County
+4400 05119 1 Pulaski County
+4400 05125 2 Saline County
+
+4420 Longview-Marshall, TX MSA
+4420 48183 1 Gregg County
+4420 48203 2 Harrison County
+
+4472 49 Los Angeles-Anaheim-Riverside, CA CMSA
+4472 0360 49 Anaheim-Santa Ana, CA PMSA
+4472 0360 49 06059 1 Orange County
+4472 4480 49 Los Angeles-Long Beach, CA PMSA
+4472 4480 49 06037 1 Los Angeles County
+4472 6000 49 Oxnard-Ventura, CA PMSA
+4472 6000 49 06111 1 Ventura County
+4472 6780 49 Riverside-San Bernardino, CA PMSA
+4472 6780 49 06065 1 Riverside County
+4472 6780 49 06071 1 San Bernardino County
+
+4520 Louisville, KY-IN MSA
+4520 18019 1 Clark County, IN
+4520 18043 1 Floyd County, IN
+4520 18061 2 Harrison County, IN
+4520 21029 2 Bullitt County, KY
+4520 21111 1 Jefferson County, KY
+4520 21185 2 Oldham County, KY
+4520 21211 2 Shelby County, KY
+
+4600 Lubbock, TX MSA
+4600 48303 1 Lubbock County
+
+4640 Lynchburg, VA MSA
+4640 51009 2 Amherst County
+4640 51031 1 Campbell County
+4640 51680 1 Lynchburg city
+
+4680 Macon-Warner Robins, GA MSA
+4680 13021 1 Bibb County
+4680 13153 1 Houston County
+4680 13169 2 Jones County
+4680 13225 2 Peach County
+
+4720 Madison, WI MSA
+4720 55025 1 Dane County
+
+4760 Manchester, NH MSA
+4760 33011 Hillsborough County (pt.)
+4760 33011 2 04500 Bedford town
+4760 33011 1 29860 Goffstown town
+4760 33011 1 45140 Manchester city
+4760 33013 Merrimack County (pt.)
+4760 33013 2 00660 Allenstown town
+4760 33013 2 37300 Hooksett town
+4760 33015 Rockingham County (pt.)
+4760 33015 2 02820 Auburn town
+4760 33015 2 09300 Candia town
+
+4800 Mansfield, OH MSA
+4800 39139 1 Richland County
+
+4840 Mayaguez, PR MSA
+4840 72011 2 Anasco Municipio
+4840 72023 2 Cabo Rojo Municipio
+4840 72067 1 Hormigueros Municipio
+4840 72097 1 Mayaguez Municipio
+4840 72125 2 San German Municipio
+
+4880 McAllen-Edinburg-Mission, TX MSA
+4880 48215 1 Hidalgo County
+
+4890 Medford, OR MSA
+4890 41029 1 Jackson County
+
+4900 Melbourne-Titusville-Palm Bay, FL MSA
+4900 12009 1 Brevard County
+
+4920 Memphis, TN-AR-MS MSA
+4920 05035 1 Crittenden County, AR
+4920 28033 2 De Soto County, MS
+4920 47157 1 Shelby County, TN
+4920 47167 2 Tipton County, TN
+
+4940 Merced, CA MSA
+4940 06047 1 Merced County
+
+4992 56 Miami-Fort Lauderdale, FL CMSA
+4992 2680 56 Fort Lauderdale-Hollywood-Pompano Beach, FL PMSA
+4992 2680 56 12011 1 Broward County
+4992 5000 56 Miami-Hialeah, FL PMSA
+4992 5000 56 12025 1 Dade County
+
+5040 Midland, TX MSA
+5040 48329 1 Midland County
+
+5082 63 Milwaukee-Racine, WI CMSA
+5082 5080 63 Milwaukee, WI PMSA
+5082 5080 63 55079 1 Milwaukee County
+5082 5080 63 55089 1 Ozaukee County
+5082 5080 63 55131 2 Washington County
+5082 5080 63 55133 1 Waukesha County
+5082 6600 63 Racine, WI PMSA
+5082 6600 63 55101 1 Racine County
+
+5120 Minneapolis-St. Paul, MN-WI MSA
+5120 27003 1 Anoka County, MN
+5120 27019 2 Carver County, MN
+5120 27025 2 Chisago County, MN
+5120 27037 1 Dakota County, MN
+5120 27053 1 Hennepin County, MN
+5120 27059 2 Isanti County, MN
+5120 27123 1 Ramsey County, MN
+5120 27139 2 Scott County, MN
+5120 27163 1 Washington County, MN
+5120 27171 2 Wright County, MN
+5120 55109 2 St. Croix County, WI
+
+5160 Mobile, AL MSA
+5160 01003 2 Baldwin County
+5160 01097 1 Mobile County
+
+5170 Modesto, CA MSA
+5170 06099 1 Stanislaus County
+
+5200 Monroe, LA MSA
+5200 22073 1 Ouachita Parish
+
+5240 Montgomery, AL MSA
+5240 01001 1 Autauga County
+5240 01051 2 Elmore County
+5240 01101 1 Montgomery County
+
+5280 Muncie, IN MSA
+5280 18035 1 Delaware County
+
+5320 Muskegon, MI MSA
+5320 26121 1 Muskegon County
+
+5345 Naples, FL MSA
+5345 12021 1 Collier County
+
+5360 Nashville, TN MSA
+5360 47021 2 Cheatham County
+5360 47037 1 Davidson County
+5360 47043 2 Dickson County
+5360 47147 2 Robertson County
+5360 47149 2 Rutherford County
+5360 47165 2 Sumner County
+5360 47187 2 Williamson County
+5360 47189 2 Wilson County
+
+5400 New Bedford, MA MSA
+5400 25005 Bristol County (pt.)
+5400 25005 1 00520 Acushnet town
+5400 25005 1 16425 Dartmouth town
+5400 25005 1 22130 Fairhaven town
+5400 25005 2 25240 Freetown town
+5400 25005 1 45000 New Bedford city
+5400 25023 Plymouth County (pt.)
+5400 25023 2 38540 Marion town
+5400 25023 2 39450 Mattapoisett town
+5400 25023 2 57600 Rochester town
+
+5480 New Haven-Meriden, CT MSA
+5480 09007 Middlesex County (pt.)
+5480 09007 2 15350 Clinton town
+5480 09007 2 40710 Killingworth town
+5480 09009 New Haven County (pt.)
+5480 09009 2 04580 Bethany town
+5480 09009 1 07310 Branford town
+5480 09009 1 14160 Cheshire town
+5480 09009 1 22910 East Haven town
+5480 09009 2 34950 Guilford town
+5480 09009 1 35650 Hamden town
+5480 09009 2 44560 Madison town
+5480 09009 1 46520 Meriden town
+5480 09009 1 52070 New Haven town
+5480 09009 1 53890 North Branford town
+5480 09009 1 54870 North Haven town
+5480 09009 1 57600 Orange town
+5480 09009 1 78740 Wallingford town
+5480 09009 1 82870 West Haven town
+5480 09009 2 87700 Woodbridge town
+
+5520 New London-Norwich, CT-RI MSA
+5520 09011 New London County, CT (pt.)
+5520 09011 2 06820 Bozrah town
+5520 09011 1 23400 East Lyme town
+5520 09011 2 29910 Franklin town
+5520 09011 2 33900 Griswold town
+5520 09011 1 34250 Groton town
+5520 09011 2 42600 Ledyard town
+5520 09011 2 43230 Lisbon town
+5520 09011 1 48900 Montville town
+5520 09011 1 52350 New London town
+5520 09011 2 55500 North Stonington town
+5520 09011 1 56270 Norwich town
+5520 09011 2 57040 Old Lyme town
+5520 09011 2 62150 Preston town
+5520 09011 2 66210 Salem town
+5520 09011 2 71670 Sprague town
+5520 09011 2 73770 Stonington town
+5520 09011 1 80280 Waterford town
+5520 09015 Windham County, CT (pt.)
+5520 09015 2 12130 Canterbury town
+5520 44009 Washington County, RI (pt.)
+5520 44009 2 35380 Hopkinton town
+5520 44009 2 77000 Westerly town
+
+5560 New Orleans, LA MSA
+5560 22051 1 Jefferson Parish
+5560 22071 1 Orleans Parish
+5560 22087 1 St. Bernard Parish
+5560 22089 2 St. Charles Parish
+5560 22095 2 St. John the Baptist Parish
+5560 22103 2 St.Tammany Parish
+
+5602 70 New York-Northern New Jersey-Long Island, NY-NJ-CT CMSA
+5602 0875 70 Bergen-Passaic, NJ PMSA
+5602 0875 70 34003 1 Bergen County
+5602 0875 70 34031 1 Passaic County
+5602 1160 70 Bridgeport-Milford, CT PMSA
+5602 1160 70 09001 Fairfield County (pt.)
+5602 1160 70 09001 1 08070 Bridgeport city
+5602 1160 70 09001 2 23890 Easton town
+5602 1160 70 09001 1 26620 Fairfield town
+5602 1160 70 09001 2 48620 Monroe town
+5602 1160 70 09001 1 68170 Shelton city
+5602 1160 70 09001 1 74190 Stratford town
+5602 1160 70 09001 1 77200 Trumbull town
+5602 1160 70 09009 New Haven County (pt.)
+5602 1160 70 09009 1 01220 Ansonia city
+5602 1160 70 09009 2 03250 Beacon Falls town
+5602 1160 70 09009 1 19550 Derby city
+5602 1160 70 09009 1 47535 Milford city
+5602 1160 70 09009 2 58300 Oxford town
+5602 1160 70 09009 1 67610 Seymour town
+5602 1930 70 Danbury, CT PMSA
+5602 1930 70 09001 Fairfield County (pt.)
+5602 1930 70 09001 1 04720 Bethel town
+5602 1930 70 09001 1 08980 Brookfield town
+5602 1930 70 09001 1 18430 Danbury city
+5602 1930 70 09001 1 50860 New Fairfield town
+5602 1930 70 09001 2 52980 Newtown town
+5602 1930 70 09001 2 63480 Redding town
+5602 1930 70 09001 2 63970 Ridgefield town
+5602 1930 70 09001 2 68310 Sherman town
+5602 1930 70 09005 Litchfield County (pt.)
+5602 1930 70 09005 2 08210 Bridgewater town
+5602 1930 70 09005 2 52630 New Milford town
+5602 3640 70 Jersey City, NJ PMSA
+5602 3640 70 34017 1 Hudson County
+5602 5015 70 Middlesex-Somerset-Hunterdon, NJ PMSA
+5602 5015 70 34019 2 Hunterdon County
+5602 5015 70 34023 1 Middlesex County
+5602 5015 70 34035 1 Somerset County
+5602 5190 70 Monmouth-Ocean, NJ PMSA
+5602 5190 70 34025 1 Monmouth County
+5602 5190 70 34029 1 Ocean County
+5602 5380 70 Nassau-Suffolk, NY PMSA
+5602 5380 70 36059 1 Nassau County
+5602 5380 70 36103 1 Suffolk County
+5602 5600 70 New York, NY PMSA
+5602 5600 70 36005 1 Bronx County
+5602 5600 70 36047 1 Kings County
+5602 5600 70 36061 1 New York County
+5602 5600 70 36079 2 Putnam County
+5602 5600 70 36081 1 Queens County
+5602 5600 70 36085 1 Richmond County
+5602 5600 70 36087 1 Rockland County
+5602 5600 70 36119 1 Westchester County
+5602 5640 70 Newark, NJ PMSA
+5602 5640 70 34013 1 Essex County
+5602 5640 70 34027 1 Morris County
+5602 5640 70 34037 2 Sussex County
+5602 5640 70 34039 1 Union County
+5602 5760 70 Norwalk, CT PMSA
+5602 5760 70 09001 Fairfield County (pt.)
+5602 5760 70 09001 1 56060 Norwalk city
+5602 5760 70 09001 2 83430 Weston town
+5602 5760 70 09001 1 83500 Westport town
+5602 5760 70 09001 2 86370 Wilton town
+5602 5950 70 Orange County, NY PMSA
+5602 5950 70 36071 1 Orange County
+5602 8040 70 Stamford, CT PMSA
+5602 8040 70 09001 Fairfield County (pt.)
+5602 8040 70 09001 1 18850 Darien town
+5602 8040 70 09001 1 33620 Greenwich town
+5602 8040 70 09001 1 50580 New Canaan town
+5602 8040 70 09001 1 73070 Stamford city
+
+5720 Norfolk-Virginia Beach-Newport News, VA MSA
+5720 51550 1 Chesapeake city
+5720 51073 2 Gloucester County
+5720 51650 1 Hampton city
+5720 51095 1 James City County
+5720 51700 1 Newport News city
+5720 51710 1 Norfolk city
+5720 51735 1 Poquoson city
+5720 51740 1 Portsmouth city
+5720 51800 1 Suffolk city
+5720 51810 1 Virginia Beach city
+5720 51830 1 Williamsburg city
+5720 51199 1 York County
+
+5790 Ocala, FL MSA
+5790 12083 1 Marion County
+
+5800 Odessa, TX MSA
+5800 48135 1 Ector County
+
+5880 Oklahoma City, OK MSA
+5880 40017 1 Canadian County
+5880 40027 1 Cleveland County
+5880 40083 2 Logan County
+5880 40087 2 McClain County
+5880 40109 1 Oklahoma County
+5880 40125 2 Pottawatomie County
+
+5910 Olympia, WA MSA
+5910 53067 1 Thurston County
+
+5920 Omaha, NE-IA MSA
+5920 19155 1 Pottawattamie County, IA
+5920 31055 1 Douglas County, NE
+5920 31153 1 Sarpy County, NE
+5920 31177 2 Washington County, NE
+
+5960 Orlando, FL MSA
+5960 12095 1 Orange County
+5960 12097 2 Osceola County
+5960 12117 1 Seminole County
+
+5990 Owensboro, KY MSA
+5990 21059 1 Daviess County
+
+6015 Panama City, FL MSA
+6015 12005 1 Bay County
+
+6020 Parkersburg-Marietta, WV-OH MSA
+6020 39167 1 Washington County, OH
+6020 54107 1 Wood County, WV
+
+6025 Pascagoula, MS MSA
+6025 28059 1 Jackson County
+
+6080 Pensacola, FL MSA
+6080 12033 1 Escambia County
+6080 12113 2 Santa Rosa County
+
+6120 Peoria, IL MSA
+6120 17143 1 Peoria County
+6120 17179 1 Tazewell County
+6120 17203 2 Woodford County
+
+6162 77 Philadelphia-Wilmington-Trenton, PA-NJ-DE-MD CMSA
+6162 6160 77 Philadelphia, PA-NJ PMSA
+6162 6160 77 34005 1 Burlington County, NJ
+6162 6160 77 34007 1 Camden County, NJ
+6162 6160 77 34015 1 Gloucester County, NJ
+6162 6160 77 42017 1 Bucks County, PA
+6162 6160 77 42029 1 Chester County, PA
+6162 6160 77 42045 1 Delaware County, PA
+6162 6160 77 42091 1 Montgomery County, PA
+6162 6160 77 42101 1 Philadelphia County, PA
+6162 8480 77 Trenton, NJ PMSA
+6162 8480 77 34021 1 Mercer County
+6162 8760 77 Vineland-Millville-Bridgeton, NJ PMSA
+6162 8760 77 34011 1 Cumberland County
+6162 9160 77 Wilmington, DE-NJ-MD PMSA
+6162 9160 77 10003 1 New Castle County, DE
+6162 9160 77 24015 2 Cecil County, MD
+6162 9160 77 34033 2 Salem County, NJ
+
+6200 Phoenix, AZ MSA
+6200 04013 1 Maricopa County
+
+6240 Pine Bluff, AR MSA
+6240 05069 1 Jefferson County
+
+6282 78 Pittsburgh-Beaver Valley, PA CMSA
+6282 0845 78 Beaver County, PA PMSA
+6282 0845 78 42007 1 Beaver County
+6282 6280 78 Pittsburgh, PA PMSA
+6282 6280 78 42003 1 Allegheny County
+6282 6280 78 42051 2 Fayette County
+6282 6280 78 42125 1 Washington County
+6282 6280 78 42129 1 Westmoreland County
+
+6320 Pittsfield, MA MSA
+6320 25003 Berkshire County (pt.)
+6320 25003 2 13345 Cheshire town
+6320 25003 1 16180 Dalton town
+6320 25003 2 30315 Hinsdale town
+6320 25003 2 34340 Lanesborough town
+6320 25003 2 34655 Lee town
+6320 25003 2 34970 Lenox town
+6320 25003 1 53960 Pittsfield city
+6320 25003 2 56795 Richmond town
+6320 25003 2 67595 Stockbridge town
+
+6360 Ponce, PR MSA
+6360 72075 2 Juana Diaz Municipio
+6360 72113 1 Ponce Municipio
+
+6400 Portland, ME MSA
+6400 23005 Cunberland County (pt.)
+6400 23005 1 10180 Cape Elizabeth town
+6400 23005 2 15430 Cumberland town
+6400 23005 2 24495 Falmouth town
+6400 23005 2 26525 Freeport town
+6400 23005 2 28240 Gorham town
+6400 23005 2 28870 Gray town
+6400 23005 2 41067 Long Island town
+6400 23005 2 53860 North Yarmouth town
+6400 23005 1 60545 Portland city
+6400 23005 2 61945 Raymond town
+6400 23005 2 66145 Scarborough town
+6400 23005 1 71990 South Portland city
+6400 23005 2 73670 Standish town
+6400 23005 1 82105 Westbrook city
+6400 23005 2 86025 Windham town
+6400 23005 2 87845 Yarmouth town
+6400 23031 York County (pt.)
+6400 23031 2 09410 Buxton town
+6400 23031 2 33665 Hollis town
+6400 23031 2 55085 Old Orchard Beach town
+
+6442 79 Portland-Vancouver, OR-WA CMSA
+6442 6440 79 Portland, OR PMSA
+6442 6440 79 41005 1 Clackamas County
+6442 6440 79 41051 1 Multnomah County
+6442 6440 79 41067 1 Washington County
+6442 6440 79 41071 2 Yamhill County
+6442 8725 79 Vancouver, WA PMSA
+6442 8725 79 53011 1 Clark County
+
+6450 Portsmouth-Dover-Rochester, NH-ME MSA
+6450 23031 York County, ME (pt.)
+6450 23031 1 04720 Berwick town
+6450 23031 2 22955 Eliot town
+6450 23031 1 37270 Kittery town
+6450 23031 2 50325 North Berwick town
+6450 23031 2 54975 Ogunquit town
+6450 23031 1 70030 South Berwick town
+6450 23031 2 81475 Wells town
+6450 23031 2 87985 York town
+6450 33015 Rockingham County, NH (pt.)
+6450 33015 2 25380 Exeter town
+6450 33015 2 31700 Greenland town
+6450 33015 2 33060 Hampton town
+6450 33015 1 50980 New Castle town
+6450 33015 2 51380 Newfields town
+6450 33015 1 51620 Newington town
+6450 33015 2 52340 Newmarket town
+6450 33015 2 54580 North Hampton town
+6450 33015 1 62900 Portsmouth city
+6450 33015 2 66180 Rye town
+6450 33015 2 74340 Stratham town
+6450 33017 Stafford County. NH (pt.)
+6450 33017 2 03460 Barrington town
+6450 33017 1 18820 Dover city
+6450 33017 1 19700 Durham town
+6450 33017 2 26020 Farmington town
+6450 33017 2 41460 Lee town
+6450 33017 2 44820 Madbury town
+6450 33017 2 48660 Milton town
+6450 33017 1 65140 Rochester city
+6450 33017 1 65540 Rollinsford town
+6450 33017 1 69940 Somersworth city
+
+6460 Poughkeepsie, NY MSA
+6460 36027 1 Dutchess County
+
+6482 80 Providence-Pawtucket-Fall River, RI-MA CMSA
+6482 2480 80 Fall River, MA-RI PMSA
+6482 2480 80 25005 Bristol County, MA (pt.)
+6482 2480 80 25005 1 23000 Fall River city
+6482 2480 80 25005 1 62430 Somerset town
+6482 2480 80 25005 1 68750 Swansea town
+6482 2480 80 25005 2 77570 Westport town
+6482 2480 80 44005 Newport County, RI (pt.)
+6482 2480 80 44005 2 42400 Little Compton town
+6482 2480 80 44005 1 70880 Tiverton town
+6482 6060 80 Pawtucket-Woonsocket-Attleboro, RI-MA PMSA
+6482 6060 80 25005 Bristol County, MA (pt.)
+6482 6060 80 25005 1 02690 Attleboro city
+6482 6060 80 25005 1 46575 North Attleborough town
+6482 6060 80 25005 2 56375 Rehoboth town
+6482 6060 80 25005 1 60645 Seekonk town
+6482 6060 80 25021 Norfolk County, MA (pt.)
+6482 6060 80 25021 2 54100 Plainville town
+6482 6060 80 25027 Worcester County, MA (pt.)
+6482 6060 80 25027 2 06015 Blackstone town
+6482 6060 80 25027 2 41585 Millville town
+6482 6060 80 44007 Providence County, RI (pt.)
+6482 6060 80 44007 2 11800 Burrillville town
+6482 6060 80 44007 1 14140 Central Falls city
+6482 6060 80 44007 1 20080 Cumberland town
+6482 6060 80 44007 1 41500 Lincoln town
+6482 6060 80 44007 1 52480 North Smithfield town
+6482 6060 80 44007 1 54640 Pawtucket city
+6482 6060 80 44007 1 66200 Smithfield town
+6482 6060 80 44007 1 80780 Woonsocket city
+6482 6480 80 Providence, RI PMSA
+6482 6480 80 44001 Bristol County (pt.)
+6482 6480 80 44001 1 05140 Barrington town
+6482 6480 80 44001 1 09280 Bristol town
+6482 6480 80 44001 1 73760 Warren town
+6482 6480 80 44003 Kent County (pt.)
+6482 6480 80 44003 1 18640 Coventry town
+6482 6480 80 44003 1 22240 East Greenwich town
+6482 6480 80 44003 1 74300 Warwick city
+6482 6480 80 44003 1 78440 West Warwick town
+6482 6480 80 44005 Newport County (pt.)
+6482 6480 80 44005 2 36820 Jamestown town
+6482 6480 80 44007 Providence County (pt.)
+6482 6480 80 44007 1 19180 Cranston city
+6482 6480 80 44007 1 22960 East Providence city
+6482 6480 80 44007 2 27460 Foster town
+6482 6480 80 44007 2 30340 Glocester town
+6482 6480 80 44007 1 37720 Johnston town
+6482 6480 80 44007 1 51760 North Providence town
+6482 6480 80 44007 1 59000 Providence city
+6482 6480 80 44007 2 64220 Scituate town
+6482 6480 80 44009 Washington County (pt.)
+6482 6480 80 44009 2 25300 Exeter town
+6482 6480 80 44009 2 48340 Narragansett town
+6482 6480 80 44009 1 51580 North Kingstown town
+6482 6480 80 44009 2 61160 Richmond town
+6482 6480 80 44009 2 67460 South Kingstown town
+
+6520 Provo-Orem, UT MSA
+6520 49049 1 Utah County
+
+6560 Pueblo, CO MSA
+6560 08101 1 Pueblo County
+
+6640 Raleigh-Durham, NC MSA
+6640 37063 1 Durham County
+6640 37069 2 Franklin County
+6640 37135 1 Orange County
+6640 37183 1 Wake County
+
+6660 Rapid City, SD MSA
+6660 46103 1 Pennington County
+
+6680 Reading, PA MSA
+6680 42011 1 Berks County
+
+6690 Redding, CA MSA
+6690 06089 1 Shasta County
+
+6720 Reno, NV MSA
+6720 32031 1 Washoe County
+
+6740 Richland-Kennewick-Pasco, WA MSA
+6740 53005 1 Benton County
+6740 53021 1 Franklin County
+
+6760 Richmond-Petersburg, VA MSA
+6760 51036 2 Charles City County
+6760 51041 1 Chesterfield County
+6760 51570 1 Colonial Heights city
+6760 51053 1 Dinwiddie County
+6760 51075 2 Goochland County
+6760 51085 2 Hanover County
+6760 51087 1 Henrico County
+6760 51670 1 Hopewell city
+6760 51127 2 New Kent County
+6760 51730 1 Petersburg city
+6760 51145 2 Powhatan County
+6760 51149 1 Prince George County
+6760 51760 1 Richmond city
+
+6800 Roanoke, VA MSA
+6800 51023 2 Botetourt County
+6800 51161 1 Roanoke County
+6800 51770 1 Roanoke city
+6800 51775 1 Salem city
+
+6820 Rochester, MN MSA
+6820 27109 1 Olmsted County
+
+6840 Rochester, NY MSA
+6840 36051 2 Livingston County
+6840 36055 1 Monroe County
+6840 36069 2 Ontario County
+6840 36073 2 Orleans County
+6840 36117 2 Wayne County
+
+6880 Rockford, IL MSA
+6880 17007 2 Boone County
+6880 17201 1 Winnebago County
+
+6920 Sacramento, CA MSA
+6920 06017 2 El Dorado County
+6920 06061 2 Placer County
+6920 06067 1 Sacramento County
+6920 06113 2 Yolo County
+
+6960 Saginaw-Bay City-Midland, MI MSA
+6960 26017 1 Bay County
+6960 26111 2 Midland County
+6960 26145 1 Saginaw County
+
+6980 St. Cloud, MN MSA
+6980 27009 1 Benton County
+6980 27141 1 Sherburne County
+6980 27145 1 Stearns County
+
+7000 St. Joseph, MO MSA
+7000 29021 1 Buchanan County
+
+7040 St. Louis, MO-IL MSA
+7040 17027 2 Clinton County, IL
+7040 17083 2 Jersey County, IL
+7040 17119 1 Madison County, IL
+7040 17133 2 Monroe County, IL
+7040 17163 1 St. Clair County, IL
+7040 29055 2 Crawford County, MO (pt.)**
+7040 29071 2 Franklin County, MO
+7040 29099 2 Jefferson County, MO
+7040 29183 1 St. Charles County, MO
+7040 29189 1 St. Louis County, MO
+7040 29510 1 St. Louis city, MO
+
+7080 Salem, OR MSA
+7080 41047 1 Marion County
+7080 41053 1 Polk County
+
+7120 Salinas-Seaside-Monterey, CA MSA
+7120 06053 1 Monterey County
+
+7160 Salt Lake City-Ogden, UT MSA
+7160 49011 1 Davis County
+7160 49035 1 Salt Lake County
+7160 49057 1 Weber County
+
+7200 San Angelo, TX MSA
+7200 48451 1 Tom Green County
+
+7240 San Antonio, TX MSA
+7240 48029 1 Bexar County
+7240 48091 2 Comal County
+7240 48187 2 Guadalupe County
+
+7320 San Diego, CA MSA
+7320 06073 1 San Diego County
+
+7362 84 San Francisco-Oakland-San Jose, CA CMSA
+7362 5775 84 Oakland, CA PMSA
+7362 5775 84 06001 1 Alameda County
+7362 5775 84 06013 1 Contra Costa County
+7362 7360 84 San Francisco, CA PMSA
+7362 7360 84 06041 1 Marin County
+7362 7360 84 06075 1 San Francisco County
+7362 7360 84 06081 1 San Mateo County
+7362 7400 84 San Jose, CA PMSA
+7362 7400 84 06085 1 Santa Clara County
+7362 7485 84 Santa Cruz, CA PMSA
+7362 7485 84 06087 1 Santa Cruz County
+7362 7500 84 Santa Rosa-Petaluma, CA PMSA
+7362 7500 84 06097 1 Sonoma County
+7362 8720 84 Vallejo-Fairfield-Napa, CA PMSA
+7362 8720 84 06055 1 Napa County
+7362 8720 84 06095 1 Solano County
+
+7442 87 San Juan-Caguas, PR CMSA
+7442 7440 87 San Juan, PR PMSA
+7442 7440 87 72017 2 Barceloneta Municipio
+7442 7440 87 72021 1 Bayamon Municipio
+7442 7440 87 72029 1 Canovanas Municipio
+7442 7440 87 72031 1 Carolina Municipio
+7442 7440 87 72033 1 Catano Municipio
+7442 7440 87 72047 2 Corozal Municipio
+7442 7440 87 72051 2 Dorado Municipio
+7442 7440 87 72053 2 Fajardo Municipio
+7442 7440 87 72054 2 Florida Municipio
+7442 7440 87 72061 1 Guaynabo Municipio
+7442 7440 87 72069 2 Humacao Municipio
+7442 7440 87 72077 1 Juncos Municipio
+7442 7440 87 72085 2 Las Piedras Municipio
+7442 7440 87 72087 1 Loiza Municipio
+7442 7440 87 72089 2 Luquillo Municipio
+7442 7440 87 72091 1 Manati Municipio
+7442 7440 87 72105 2 Naranjito Municipio
+7442 7440 87 72119 1 Rio Grande Municipio
+7442 7440 87 72127 1 San Juan Municipio
+7442 7440 87 72135 1 Toa Alta Municipio
+7442 7440 87 72137 1 Toa Baja Municipio
+7442 7440 87 72139 1 Trujillo Alto Municipio
+7442 7440 87 72143 1 Vega Alta Municipio
+7442 7440 87 72145 1 Vega Baja Municipio
+7442 1310 87 Caguas, PR PMSA
+7442 1310 87 72007 2 Aguas Buenas Municipio
+7442 1310 87 72025 1 Caguas Municipio
+7442 1310 87 72035 2 Cayey Municipio
+7442 1310 87 72041 2 Cidra Municipio
+7442 1310 87 72063 1 Gurabo Municipio
+7442 1310 87 72129 1 San Lorenzo Municipio
+
+7480 Santa Barbara-Santa Maria-Lompoc, CA MSA
+7480 06083 1 Santa Barbara County
+
+7490 Santa Fe, NM MSA
+7490 35028 2 Los Alamos County
+7490 35049 1 Santa Fe County
+
+7510 Sarasota, FL MSA
+7510 12115 1 Sarasota County
+
+7520 Savannah, GA MSA
+7520 13051 1 Chatham County
+7520 13103 2 Effingham County
+
+7560 Scranton--Wilkes-Barre, PA MSA
+7560 42037 2 Columbia County
+7560 42069 1 Lackawanna County
+7560 42079 1 Luzerne County
+7560 42089 2 Monroe County
+7560 42131 2 Wyoming County
+
+7602 91 Seattle-Tacoma, WA CMSA
+7602 7600 91 Seattle, WA PMSA
+7602 7600 91 53033 1 King County
+7602 7600 91 53061 1 Snohomish County
+7602 8200 91 Tacoma, WA PMSA
+7602 8200 91 53053 1 Pierce County
+
+7610 Sharon, PA MSA
+7610 42085 1 Mercer County
+
+7620 Sheboygan, WI MSA
+7620 55117 1 Sheboygan County
+
+7640 Sherman-Denison, TX MSA
+7640 48181 1 Grayson County
+
+7680 Shreveport, LA MSA
+7680 22015 1 Bossier Parish
+7680 22017 1 Caddo Parish
+
+7720 Sioux City, IA-NE MSA
+7720 19193 1 Woodbury County, IA
+7720 31043 1 Dakota County, NE
+
+7760 Sioux Falls, SD MSA
+7760 46099 1 Minnehaha County
+
+7800 South Bend-Mishawaka, IN MSA
+7800 18141 1 St.Joseph County
+
+7840 Spokane, WA MSA
+7840 53063 1 Spokane County
+
+7880 Springfield, IL MSA
+7880 17129 2 Menard County
+7880 17167 1 Sangamon County
+
+7920 Springfield, MO MSA
+7920 29043 2 Christian County
+7920 29077 1 Greene County
+
+8000 Springfield, MA MSA
+8000 25013 Hampden County (pt.)
+8000 25013 1 00800 Agawam town
+8000 25013 1 13660 Chicopee city
+8000 25013 1 19645 East Longmeadow town
+8000 25013 2 28075 Hampden town
+8000 25013 1 30840 Holyoke city
+8000 25013 1 36300 Longmeadow town
+8000 25013 1 37175 Ludlow town
+8000 25013 2 42145 Monson town
+8000 25013 2 42530 Montgomery town
+8000 25013 2 52105 Palmer town
+8000 25013 2 58650 Russell town
+8000 25013 2 65825 Southwick town
+8000 25013 1 67000 Springfield city
+8000 25013 1 76030 Westfield city
+8000 25013 1 77850 West Springfield town
+8000 25013 2 79740 Wilbraham town
+8000 25015 Hampshire County (pt.)
+8000 25015 2 04825 Belchertown town
+8000 25015 1 19330 Easthampton town
+8000 25015 2 26535 Granby town
+8000 25015 2 31785 Huntington town
+8000 25015 1 46330 Northampton city
+8000 25015 2 62745 Southampton town
+8000 25015 1 64145 South Hadley town
+
+8050 State College, PA MSA
+8050 42027 1 Centre County
+
+8080 Steubenville-Weirton, OH-WV MSA
+8080 39081 1 Jefferson County, OH
+8080 54009 1 Brooke County, WV
+8080 54029 1 Hancock County, WV
+
+8120 Stockton, CA MSA
+8120 06077 1 San Joaquin County
+
+8160 Syracuse, NY MSA
+8160 36053 2 Madison County
+8160 36067 1 Onondaga County
+8160 36075 2 Oswego County
+
+8240 Tallahassee, FL MSA
+8240 12039 2 Gadsden County
+8240 12073 1 Leon County
+
+8280 Tampa-St. Petersburg-Clearwater, FL MSA
+8280 12053 2 Hernando County
+8280 12057 1 Hillsborough County
+8280 12101 1 Pasco County
+8280 12103 1 Pinellas County
+
+8320 Terre Haute, IN MSA
+8320 18021 2 Clay County
+8320 18167 1 Vigo County
+
+8360 Texarkana, TX-Texarkana, AR MSA
+8360 05091 1 Miller County, AR
+8360 48037 1 Bowie County, TX
+
+8400 Toledo, OH MSA
+8400 39051 2 Fulton County
+8400 39095 1 Lucas County
+8400 39173 2 Wood County
+
+8440 Topeka, KS MSA
+8440 20177 1 Shawnee County
+
+8520 Tucson, AZ MSA
+8520 04019 1 Pima County
+
+8560 Tulsa, OK MSA
+8560 40037 2 Creek County
+8560 40113 1 Osage County
+8560 40131 2 Rogers County
+8560 40143 1 Tulsa County
+8560 40145 2 Wagoner County
+
+8600 Tuscaloosa, AL MSA
+8600 01125 1 Tuscaloosa County
+
+8640 Tyler, TX MSA
+8640 48423 1 Smith County
+
+8680 Utica-Rome, NY MSA
+8680 36043 2 Herkimer County
+8680 36065 1 Oneida County
+
+8750 Victoria, TX MSA
+8750 48469 1 Victoria County
+
+8780 Visalia-Tulare-Porterville, CA MSA
+8780 06107 1 Tulare County
+
+8800 Waco, TX MSA
+8800 48309 1 McLennan County
+
+8840 Washington, DC-MD-VA MSA
+8840 11001 1 District of Columbia
+8840 24009 2 Calvert County, MD
+8840 24017 2 Charles County, MD
+8840 24021 2 Frederick County, MD
+8840 24031 1 Montgomery County, MD
+8840 24033 1 Prince George's County, MD
+8840 51510 1 Alexandria city, VA
+8840 51013 1 Arlington County, VA
+8840 51059 1 Fairfax County, VA
+8840 51600 1 Fairfax city, VA
+8840 51610 1 Falls Church city, VA
+8840 51107 2 Loudoun County, VA
+8840 51683 2 Manassas city, VA
+8840 51685 2 Manassas Park city, VA
+8840 51153 2 Prince William County, VA
+8840 51179 2 Stafford County, VA
+
+8880 Waterbury, CT MSA
+8880 09005 Litchfield County (pt.)
+8880 09005 2 04930 Bethlehem town
+8880 09005 1 75730 Thomaston town
+8880 09005 1 80490 Watertown town
+8880 09005 2 87910 Woodbury town
+8880 09009 New Haven County (pt.)
+8880 09009 1 46940 Middlebury town
+8880 09009 1 49950 Naugatuck town
+8880 09009 2 62290 Prospect town
+8880 09009 2 69640 Southbury town
+8880 09009 1 80070 Waterbury town
+8880 09009 1 87560 Wolcott town
+
+8920 Waterloo-Cedar Falls, IA MSA
+8920 19013 1 Black Hawk County
+8920 19017 2 Bremer County
+
+8940 Wausau, WI MSA
+8940 55073 1 Marathon County
+
+8960 West Palm Beach-Boca Raton-Delray Beach, FL MSA
+8960 12099 1 Palm Beach County
+
+9000 Wheeling, WV-OH MSA
+9000 39013 2 Belmont County, OH
+9000 54051 1 Marshall County, WV
+9000 54069 1 Ohio County, WV
+
+9040 Wichita, KS MSA
+9040 20015 2 Butler County
+9040 20079 2 Harvey County
+9040 20173 1 Sedgwick County
+
+9080 Wichita Falls, TX MSA
+9080 48485 1 Wichita County
+
+9140 Williamsport, PA MSA
+9140 42081 1 Lycoming County
+
+9200 Wilmington, NC MSA
+9200 37129 1 New Hanover County
+
+9240 Worcester, MA MSA
+9240 25027 Worcester County (pt.)
+9240 25027 1 02760 Auburn town
+9240 25027 2 03740 Barre town
+9240 25027 2 07525 Boylston town
+9240 25027 2 09105 Brookfield town
+9240 25027 2 12715 Charlton town
+9240 25027 2 14395 Clinton town
+9240 25027 2 17300 Douglas town
+9240 25027 2 17685 Dudley town
+9240 25027 2 18560 East Brookfield town
+9240 25027 1 26430 Grafton town
+9240 25027 1 30560 Holden town
+9240 25027 1 34795 Leicester town
+9240 25027 1 41340 Millbury town
+9240 25027 1 46820 Northborough town
+9240 25027 1 46925 Northbridge town
+9240 25027 2 47135 North Brookfield town
+9240 25027 1 51825 Oxford town
+9240 25027 2 52420 Paxton town
+9240 25027 2 55395 Princeton town
+9240 25027 2 58825 Rutland town
+9240 25027 1 61800 Shrewsbury town
+9240 25027 2 66105 Spencer town
+9240 25027 2 67385 Sterling town
+9240 25027 2 68610 Sutton town
+9240 25027 1 71620 Uxbridge town
+9240 25027 1 73895 Webster town
+9240 25027 2 75015 Westborough town
+9240 25027 1 75155 West Boylston town
+9240 25027 1 82000 Worcester city
+
+9260 Yakima, WA MSA
+9260 53077 1 Yakima County
+
+9280 York, PA MSA
+9280 42001 2 Adams County
+9280 42133 1 York County
+
+9320 Youngstown-Warren, OH MSA
+9320 39099 1 Mahoning County
+9320 39155 1 Trumbull County
+
+9340 Yuba City, CA MSA
+9340 06101 1 Sutter County
+9340 06115 1 Yuba County
+
+9360 Yuma, AZ MSA
+9360 04027 1 Yuma County
+
+File Layout:
+
+Character Length Field
+
+1-4 4 Four-digit FIPS MSA/CMSA code (6/30/90 definition)
+5-8 4 Blank
+9-12 4 Four-digit FIPS PMSA code (6/30/90 definition)
+13-16 4 Blank
+17-18 2 Alternative two-digit FIPS CMSA code (6/30/90 definition)
+19-24 6 Blank
+25-26 2 Two-digit FIPS state code (blank at MA level)
+27-29 3 Three-digit FIPS county code (blank at MA level)
+30-32 3 Blank
+33-33 1 Central/Outlying county or city/town flag (1 = central, 2 = Outlying)
+34-40 7 Blank
+41-45 5 Five-digit FIPS entity code (blank at MA and county levels)
+46-48 3 Blank
+49-99 51 MSA/CMSA title
+52-99 48 PMSA title
+57-99 43 Component county name
+65-99 31 Component city or town name (in New England only)
+
+* State and County Code: First two digits indicate State, last three digits indicate county.
+
+** The portion of Sullivan city in Crawford County, Missouri, is legally
+part of the St. Louis, MO-IL MSA. The 1990 census tabulations and
+intercensal estimates for the St. Louis, MO-IL MSA do not include this area.
diff --git a/inst/share/gshhs_c.b b/inst/share/gshhs_c.b
index 20a17bb..3dabdbc 100644
Binary files a/inst/share/gshhs_c.b and b/inst/share/gshhs_c.b differ
diff --git a/inst/share/wdb_borders_c.b b/inst/share/wdb_borders_c.b
index 3c05f58..cb291ff 100644
Binary files a/inst/share/wdb_borders_c.b and b/inst/share/wdb_borders_c.b differ
diff --git a/man/CCmaps.Rd b/man/CCmaps.Rd
index dcf9d3f..aad43c6 100644
--- a/man/CCmaps.Rd
+++ b/man/CCmaps.Rd
@@ -7,7 +7,10 @@ Conditioned choropleth maps permit the conditioning of a map of a variable on th
}
\usage{
-CCmaps(obj, zcol = NULL, cvar = NULL, cvar.names = NULL, ..., names.attr, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, aspect = mapasp(obj, xlim, ylim), sp.layout = NULL, xlim = bbox(obj)[1, ], ylim = bbox(obj)[2, ])
+CCmaps(obj, zcol = NULL, cvar = NULL, cvar.names = NULL, ..., names.attr,
+ scales = list(draw = FALSE), xlab = NULL, ylab = NULL,
+ aspect = mapasp(obj, xlim, ylim), sp.layout = NULL, xlim = bbox(obj)[1, ],
+ ylim = bbox(obj)[2, ])
}
%- maybe also 'usage' for other objects documented here.
\arguments{
diff --git a/man/Rgshhs.Rd b/man/Rgshhs.Rd
index 7eb6839..f3cfc55 100644
--- a/man/Rgshhs.Rd
+++ b/man/Rgshhs.Rd
@@ -4,7 +4,7 @@
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Read GSHHS data into sp object}
\description{
- If the data are polygon data, the function will read GSHHS polygons into SpatialPolygons object for a chosen region, using binary shorelines from Global Self-consistant Hierarchical High-resolution Shorelines, release 2.2.0 of July 15, 2011 (\url{ftp://ftp.soest.hawaii.edu/pwessel/gshhs/gshhs+wdbii_2.2.0.tbz}).
+ If the data are polygon data, the function will read GSHHS polygons into SpatialPolygons object for a chosen region, using binary shorelines from Global Self-consistant Hierarchical High-resolution (Shorelines) Geography, release 2.3.0 of February 1, 2014 (\url{http://www.soest.hawaii.edu/pwessel/gshhg/gshhg-bin-2.3.0.zip}).
The \code{getRgshhsMap} function calls \code{Rgshhs} internally to simplify the interface by returning only a SpatialPolygons object rather than a more complex list, and by calling \code{Rgshhs} twice either side of longitude 0 degrees for values of \dQuote{xlim} straddling 0, then merging the polygons retrieved.
@@ -20,7 +20,7 @@ getRgshhsMap(fn = system.file("share/gshhs_c.b", package= "maptools"),
}
%- maybe also 'usage' for other objects documented here.
\arguments{
- \item{fn}{filename or full path to GSHHS 2.2.0 file to be read}
+ \item{fn}{filename or full path to GSHHS 2.3.0 file to be read}
\item{xlim}{longitude limits within 0-360 in most cases, negative longitudes are also found east of the Atlantic, but the Americas are recorded as positive values}
\item{ylim}{latitude limits}
\item{level}{maximum GSHHS level to include, defaults to 4 (everything), setting 1 will only retrieve land, no lakes}
@@ -47,7 +47,7 @@ getRgshhsMap(fn = system.file("share/gshhs_c.b", package= "maptools"),
for line data, a list with the following component:
\item{SP}{a SpatialLines object}
}
-\references{\url{http://www.soest.hawaii.edu/pwessel/gshhs/index.html}, \url{ftp://ftp.soest.hawaii.edu/pwessel/gshhs/gshhs+wdbii_2.2.0.tbz}; Wessel, P., and W. H. F. Smith, A Global Self-consistent, Hierarchical, High-resolution Shoreline Database, J. Geophys. Res., 101, 8741-8743, 1996.}
+\references{\url{http://www.soest.hawaii.edu/pwessel/gshhg/}, \url{http://www.soest.hawaii.edu/pwessel/gshhg/gshhg-bin-2.3.0.zip}; Wessel, P., and W. H. F. Smith, A Global Self-consistent, Hierarchical, High-resolution Shoreline Database, J. Geophys. Res., 101, 8741-8743, 1996.}
\author{Roger Bivand}
\note{
@@ -58,7 +58,7 @@ By default, if the rgeos package is available, it is used for topology operation
}
\examples{
-if (!rgeosStatus()) gpclibPermit()
+if (rgeosStatus()) {
gshhs.c.b <- system.file("share/gshhs_c.b", package="maptools")
WEx <- c(-12, 3)
WEy <- c(48, 59)
@@ -83,5 +83,6 @@ xlims <- c(0,360)
ylims <- c(-90,90)
world <- Rgshhs(gshhs.c.b, xlim=xlims, ylim=ylims, level=1, checkPolygons=TRUE)
}
+}
\keyword{spatial}
diff --git a/man/checkPolygonsHoles.Rd b/man/checkPolygonsHoles.Rd
index 1507ae2..4eef5e6 100644
--- a/man/checkPolygonsHoles.Rd
+++ b/man/checkPolygonsHoles.Rd
@@ -31,7 +31,7 @@ If the gpclib package is used, an intersection between a gpc.poly object with on
\author{Roger Bivand}
%\seealso{\code{\link[rgeos]{createPolygonsComment}}, \code{\link[rgeos]{gIsValid}}, \code{\link[rgeos]{gEquals}}, \code{\link[rgeos]{gContainsProperly}}}
\examples{
-if (!rgeosStatus()) gpclibPermit()
+if (rgeosStatus()) {
nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
proj4string=CRS("+proj=longlat +ellps=clrk66"))
pl <- slot(nc1, "polygons")
@@ -99,5 +99,6 @@ title(xlab="Hole slot values after checking")
par(opar)
}
}
+}
\keyword{spatial}
diff --git a/man/elide-methods.Rd b/man/elide-methods.Rd
old mode 100644
new mode 100755
diff --git a/man/gcDestination.Rd b/man/gcDestination.Rd
old mode 100644
new mode 100755
diff --git a/man/kmlLines.Rd b/man/kmlLines.Rd
new file mode 100644
index 0000000..14c0db4
--- /dev/null
+++ b/man/kmlLines.Rd
@@ -0,0 +1,62 @@
+\name{kmlLines}
+\alias{kmlLines}
+
+\title{Create and write a KML file on the basis of a given Lines object}
+\description{
+ The function is used to create and write a KML file on the basis of a given Lines object (a list of Line objects) for the usage in Google Earth and Google Maps.
+}
+\usage{
+kmlLines(obj=NULL, kmlfile=NULL,
+ name="R Lines", description="", col=NULL, visibility=1, lwd=1,
+ kmlname="", kmldescription="")
+}
+
+\arguments{
+ \item{obj}{a \code{Lines} or \code{SpatialLinesDataFrame} object}
+ \item{kmlfile}{if not \code{NULL} the name as character string of the kml file to be written}
+ \item{name}{the name of the KML line}
+ \item{description}{the description of the KML line (HTML tags allowed)}
+ \item{col}{the stroke color (see also Color Specification) of the KML line}
+ \item{visibility}{if set to \code{1} or \code{TRUE} specifies that the KML line should be visible after loading}
+ \item{lwd}{the stroke width for the KML line}
+ \item{kmlname}{the name of the KML layer}
+ \item{kmldescription}{the description of the KML layer (HTML tags allowed)}
+}
+
+\details{
+ The function is used to convert a given \code{Lines} object (a list of Line objects) or the first \code{Lines} object listed in a passed \code{SpatialLinesDataFrame} object into KML line(s). If \code{kmlfile} is not \code{NULL} the result will be written into that file. If \code{kmlfile} is \code{NULL} the generated KML lines will be returned (see also value). Function no longer uses \code{append} greatly improving performance on large objects or lists.
+
+For a passed \code{Lines} object the function generates a <Style> tag whereby its id attribute is set to the passed object's ID.
+
+Note that the geometries should be in geographical coordinates with datum WGS84.
+
+The resulting KML line will be embedded in \code{<Placemark><MultiGeometry><LineString>}.
+}
+
+\value{
+x is a list with the elements \code{style} and \code{content} containing the generated lines of the KML file as character vectors if \code{kmlfile} is \code{NULL}.
+
+y is a list with the elements \code{header} and \code{footer} representing the KML file header and footer if \code{obj} is \code{NULL}.
+}
+
+\section{Color Specification}{
+The following color specifications are allowed: \code{'red'}, \code{2}, or as hex code \code{'#RRGGBB'} resp. \code{'#RRGGBBAA'} for passing the alpha value.
+}
+
+\author{Hans-J. Bibiko, Jon Callahan, Steven Brey}
+\seealso{\code{\link{kmlOverlay}}, \code{\link{kmlPolygon}}, \code{\link[sp]{Line}}}
+
+\examples{
+# Maptools library required
+library(maptools)
+# load line object
+rivers <- readShapeSpatial(system.file("shapes/fylk-val-ll.shp",
+ package="maptools")[1], proj4string=CRS("+proj=longlat"))
+# create kml file
+kmlLines(rivers, kmlfile = "rivers.kml", name = "R Lines",
+ description = "Hello!", col = "blue", visibility = 1, lwd = 1,
+ kmlname = "", kmldescription = "")
+}
+\concept{kml}
+\keyword{spatial}
+
diff --git a/man/kmlPoints.Rd b/man/kmlPoints.Rd
index 6f8365a..2d82107 100644
--- a/man/kmlPoints.Rd
+++ b/man/kmlPoints.Rd
@@ -51,10 +51,12 @@ num <- length(SplashDams)
td <- tempdir()
kmlfile <- paste(td, "OregonSplashDams.kml", sep="/")
kmlname <- "Oregon Splash Dams"
-kmldescription <- "Data for Splash Dams in western Oregon. See http://www.fs.fed.us/pnw/lwm/aem/people/burnett.html#projects_activities for more information."
+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"
name <- paste("Dam on",SplashDams$streamName)
-description <- paste("<b>owner:</b>",SplashDams$owner,"<br><b>dates:</b>",SplashDams$datesUsed)
+description <- paste("<b>owner:</b>", SplashDams$owner, "<br><b>dates:</b>", SplashDams$datesUsed)
kmlPoints(SplashDams, kmlfile=kmlfile, name=name, description=description,
icon=icon, kmlname=kmlname, kmldescription=kmldescription)
diff --git a/man/kmlPolygon.Rd b/man/kmlPolygon.Rd
old mode 100644
new mode 100755
diff --git a/man/kmlPolygons.Rd b/man/kmlPolygons.Rd
new file mode 100644
index 0000000..31f1157
--- /dev/null
+++ b/man/kmlPolygons.Rd
@@ -0,0 +1,83 @@
+\name{kmlPolygons}
+\alias{kmlPolygons}
+
+\title{Create and write a KML file on the basis of a given Polygons object or list of Polygons or SpatialPolygonsDataFrame }
+
+\description{
+The function is used to create and write a KML file on the basis of a given Polygons object (a list of Polygon objects of SpatialPolygonsDataFrame class) for the usage in Google Earth and Google Maps.
+}
+
+\usage{
+kmlPolygons(obj=NULL, kmlfile=NULL,
+ name="KML Polygons", description="", col=NULL, visibility=1, lwd=1,
+ border="white", kmlname="", kmldescription="")
+}
+
+\arguments{
+ \item{obj}{a \code{Polygons} or \code{SpatialPolygonsDataFrame} object or list of objects}
+ \item{kmlfile}{if not \code{NULL} the name as character string of the kml file to be written to working directory as "NAME.kml"}
+ \item{name}{the name of the KML polygon in Google Earth}
+ \item{description}{the description of the KML polygon displayed in Google Earth or Maps (HTML tags allowed)}
+ \item{col}{the fill color (see also Color Specification) of the KML polygon. If passing a list of \code{Polyons} or \code{SpatialPolygonsDataFrame} and \code{length(col)} is less than \code{length(object)} the first color in col will be applied to all objects in the list}
+ \item{visibility}{if set to \code{1} or \code{TRUE} specifies that the KML polygon should be visible after loading}
+ \item{lwd}{the stroke (polygon's border line) width for the KML polygon}
+ \item{border}{the stroke color (see also Color Specification) for the KML polygon}
+ \item{kmlname}{the name of the KML layer}
+ \item{kmldescription}{the description of the KML layer (HTML tags allowed)}
+}
+
+\details{
+ The function is used to convert a given \code{Polygons} object (a list of Polygon objects) or the \code{Polygons} object listed in a passed \code{SpatialPolygonsDataFrame} object into KML polygon. If \code{kmlfile} is not \code{NULL} the result will be written into that file. If \code{kmlfile} is \code{NULL} the generated KML lines will be returned (see also value).
+
+The conversion can also handle polygons which are marked as holes inside of the Polygons object if these holes are listed right after that polygon in which these holes appear. That implies that a given plot order set in the Polygons object will \bold{not} be considered.
+
+For a passed \code{Polygons} object the function generates a <Style> tag whereby its id attribute is set to the passed object's ID.
+
+Note that the geometries should be in geographical coordinates with datum WGS84.
+
+The resulting KML polygon will be embedded in \code{<Placemark><MultiGeometry><Polygon>}.
+}
+
+\value{
+x is a list with the elements \code{style} and \code{content} containing the generated lines of the KML file as character vectors if \code{kmlfile} is \code{NULL}.
+
+y is a list with the elements \code{header} and \code{footer} representing the KML file' header resp. footer if \code{obj} is \code{NULL} (see second example).
+}
+
+\section{Color Specification}{
+The following color specifications are allowed: \code{'red'}, \code{2}, or as hex code \code{'#RRGGBB'} resp. \code{'#RRGGBBAA'} for passing the alpha value.
+}
+
+\author{Hans-J. Bibiko, Jon Callihan, Steven Brey}
+
+\seealso{\code{\link{kmlPolygon}}, \code{\link{kmlLines}}, \code{\link[sp]{SpatialPolygons}}, \code{kmlPoints}}
+
+\examples{
+data(wrld_simpl)
+## creates a KML file containing the polygons of a political world map
+kmlPolygons(wrld_simpl, kmlfile = "worldPolitical.kml", name = "KML Polygons",
+ description = "the world", col = "red",
+ visibility = 1, lwd = 1, border = "white", kmlname = "R Test",
+ kmldescription = "This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
+
+data(wrld_simpl)
+## create a KML file containing the polygons of Brazil, Uganda, and Canada
+regions <- c("Brazil","Canada","Uganda")
+wrld_simpl_subset <- wrld_simpl[wrld_simpl$NAME \%in\% regions,]
+kmlPolygons(wrld_simpl_subset, kmlfile = "worldPoliticalSubset.kml",
+ name = "KML Polygons subset", description = "three countries", col = "blue",
+ visibility = 1, lwd = 1, border = "white", kmlname = "R Test 2",
+ kmldescription = "This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
+## combine to make a list of polygon objects to plot
+polList <- c(regions,wrld_simpl)
+kmlPolygons(wrld_simpl_subset, kmlfile = "worldPoliticalandSubset.kml",
+ name = "KML Polygons subset", description = "three countries highlighted in world",
+ col = sample(colours(), length(polList)), visibility = 1, lwd = 1, border = "white",
+ kmlname = "R Test 2",
+ kmldescription = "This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
+
+}
+
+\concept{kml}
+\keyword{spatial}
+
diff --git a/man/map2SpatialPolygons.Rd b/man/map2SpatialPolygons.Rd
index 4648109..9a025f0 100644
--- a/man/map2SpatialPolygons.Rd
+++ b/man/map2SpatialPolygons.Rd
@@ -41,7 +41,7 @@ nor_coast_poly <- map("world", "norway", fill=TRUE, col="transparent",
nor_coast_poly$names
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"))
sapply(slot(nor_coast_poly_sp, "polygons"),
function(x) length(slot(x, "Polygons")))
plot(nor_coast_poly_sp, col="grey", axes=TRUE)
@@ -51,7 +51,7 @@ plot(nor_coast_lines, type="l")
nor_coast_lines <- pruneMap(nor_coast_lines, xlim=c(4,32), ylim=c(58,72))
lines(nor_coast_lines, col="red")
nor_coast_lines_sp <- map2SpatialLines(nor_coast_lines,
- proj4string=CRS("+proj=longlat +datum=wgs84"))
+ proj4string=CRS("+proj=longlat +datum=WGS84"))
plot(nor_coast_poly_sp, col="grey", axes=TRUE)
plot(nor_coast_lines_sp, col="blue", add=TRUE)
}
diff --git a/man/nowrapRecenter.Rd b/man/nowrapRecenter.Rd
index 501cddb..b6c8353 100644
--- a/man/nowrapRecenter.Rd
+++ b/man/nowrapRecenter.Rd
@@ -31,7 +31,6 @@ nowrapSpatialPolygons(obj, offset = 0, eps=rep(.Machine$double.eps^(1/2), 2),
\examples{
\dontrun{
-if (!rgeosStatus()) gpclibPermit()
library(maps)
world <- map("world", fill=TRUE, col="transparent", plot=FALSE)
worldSpP <- map2SpatialPolygons(world, world$names, CRS("+proj=longlat"))
@@ -48,6 +47,7 @@ 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")),
@@ -58,6 +58,7 @@ bbox(SRr)
SRnr <- nowrapRecenter(SR)
bbox(SRnr)
}
+}
\keyword{spatial}
diff --git a/man/pointLabelLattice.Rd b/man/pointLabelLattice.Rd
index 898b78c..43c2510 100644
--- a/man/pointLabelLattice.Rd
+++ b/man/pointLabelLattice.Rd
@@ -72,7 +72,7 @@ myTheme <- list(add.text=list(
col='midnightblue',
fontface=2,
fontfamily='mono'))
-
+library(lattice)
xyplot(y~x,
labels=labels,
par.settings=myTheme,
diff --git a/man/readSplus.Rd b/man/readSplus.Rd
index 68ad909..fec37b0 100644
--- a/man/readSplus.Rd
+++ b/man/readSplus.Rd
@@ -22,6 +22,7 @@ readSplus(file, proj4string = CRS(as.character(NA)))
\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}}}
\examples{
+if (rgeosStatus()) {
geobugs <- readSplus(system.file("share/Splus.map", package="maptools"))
plot(geobugs, axes=TRUE, col=1:3)
row.names(geobugs)
@@ -31,6 +32,7 @@ pls1 <- lapply(pls, checkPolygonsHoles)
sapply(pls1, function(i) sapply(slot(i, "Polygons"), slot, "hole"))
plot(SpatialPolygons(pls1), axes=TRUE, col=1:3)
}
+}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{spatial}
diff --git a/man/snapPointsToLines.Rd b/man/snapPointsToLines.Rd
index 38e9856..2b66880 100644
--- a/man/snapPointsToLines.Rd
+++ b/man/snapPointsToLines.Rd
@@ -9,7 +9,7 @@ distance of each point to any of the lines. This function does not work with
geographic coordinates.
}
\usage{
-snapPointsToLines(points, lines, maxDist = NA, withAttrs = TRUE)
+snapPointsToLines(points, lines, maxDist = NA, withAttrs = TRUE, idField=NA)
}
\arguments{
\item{points}{
@@ -26,6 +26,11 @@ are farther apart. This parameter is optional.
Boolean value for preserving (TRUE) or getting rid (FALSE) of the original point
attributes. Default: TRUE. This parameter is optional.
}
+ \item{idField}{
+A string specifying the field which contains each line's id. This id will
+be transferred to the snapped points data set to distinguish the line which each
+point was snapped to.
+}
}
\value{
SpatialPointsDataFrame object as defined by the R package 'sp'. This object
@@ -56,6 +61,6 @@ xc = c(1.2,1.5,2.5)
yc = c(1.5,2.2,1.6)
Spoints = SpatialPoints(cbind(xc, yc))
-snapPointsToLines(Spoints, Sldf)
+if (rgeosStatus()) snapPointsToLines(Spoints, Sldf)
}
\keyword{ spatial }
diff --git a/man/spCbind-methods.Rd b/man/spCbind-methods.Rd
index caf8d3e..f543ff9 100644
--- a/man/spCbind-methods.Rd
+++ b/man/spCbind-methods.Rd
@@ -35,6 +35,7 @@
\examples{
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
+library(foreign)
xtra <- read.dbf(system.file("share/nc_xtra.dbf", package="maptools")[1])
o <- match(xx$CNTY_ID, xtra$CNTY_ID)
xtra1 <- xtra[o,]
diff --git a/man/sun-methods.Rd b/man/sun-methods.Rd
index 12acd37..487acbb 100644
--- a/man/sun-methods.Rd
+++ b/man/sun-methods.Rd
@@ -167,6 +167,7 @@ day_length <- down$time - up$time
plot(Hels_seq, day_length, type="l")
## Using a grid of spatial points for the same point in time
+\dontrun{
grd <- GridTopology(c(-179,-89), c(1,1), c(359,179))
SP <- SpatialPoints(coordinates(grd),
proj4string=CRS("+proj=longlat +datum=WGS84"))
@@ -177,6 +178,7 @@ SPDF <- SpatialGridDataFrame(grd,
data=data.frame(winter=win))
image(SPDF, axes=TRUE, col=cm.colors(40))
}
+}
\keyword{methods}
\keyword{manip}
diff --git a/man/unionSpatialPolygons.Rd b/man/unionSpatialPolygons.Rd
index 89ddf8d..c2806f7 100644
--- a/man/unionSpatialPolygons.Rd
+++ b/man/unionSpatialPolygons.Rd
@@ -26,7 +26,7 @@ unionSpatialPolygons(SpP, IDs, threshold=NULL, avoidGEOS=FALSE, avoidUnaryUnion=
\author{Roger Bivand}
%\seealso{\code{\link[rgeos]{gUnaryUnion}}}
\examples{
-if (!rgeosStatus()) gpclibPermit()
+if (rgeosStatus()) {
nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
proj4string=CRS("+proj=longlat +datum=NAD27"))
lps <- coordinates(nc1)
@@ -34,4 +34,5 @@ ID <- cut(lps[,1], quantile(lps[,1]), include.lowest=TRUE)
reg4 <- unionSpatialPolygons(nc1, ID)
row.names(reg4)
}
+}
\keyword{spatial}
diff --git a/maptools-Ex.R b/maptools-Ex.R
deleted file mode 100644
index de26b77..0000000
--- a/maptools-Ex.R
+++ /dev/null
@@ -1,1654 +0,0 @@
-pkgname <- "maptools"
-source(file.path(R.home("share"), "R", "examples-header.R"))
-options(warn = 1)
-library('maptools')
-
-assign(".oldSearch", search(), pos = 'CheckExEnv')
-cleanEx()
-nameEx("CCmaps")
-### * CCmaps
-
-flush(stderr()); flush(stdout())
-
-### Name: CCmaps
-### Title: Conditioned choropleth maps
-### Aliases: CCmaps
-### Keywords: spatial
-
-### ** Examples
-
-nc.sids <- readShapeSpatial(system.file("shapes/sids.shp",
- package="maptools")[1], IDvar="FIPSNO",
- proj4string=CRS("+proj=longlat +ellps=clrk66"))
-nc.sids$ft.SID74 <- sqrt(1000)*(sqrt(nc.sids$SID74/nc.sids$BIR74) +
- sqrt((nc.sids$SID74+1)/nc.sids$BIR74))
-nc.sids$ft.NWBIR74 <- sqrt(1000)*(sqrt(nc.sids$NWBIR74/nc.sids$BIR74) +
- sqrt((nc.sids$NWBIR74+1)/nc.sids$BIR74))
-library(lattice)
-sh_nw4 <- equal.count(nc.sids$ft.NWBIR74, number=4, overlap=1/5)
-CCmaps(nc.sids, "ft.SID74", list("Nonwhite_births"=sh_nw4),
- col.regions=colorRampPalette(c("yellow1", "brown3"))(20),
- main="Transformed SIDS rates 1974-8")
-
-
-
-cleanEx()
-nameEx("ContourLines2SLDF")
-### * ContourLines2SLDF
-
-flush(stderr()); flush(stdout())
-
-### Name: ContourLines2SLDF
-### Title: Converter functions to build SpatialLinesDataFrame objects
-### Aliases: ArcObj2SLDF ContourLines2SLDF MapGen2SL
-### Keywords: spatial
-
-### ** Examples
-
-#data(co37_d90_arc) # retrieved as:
-# library(RArcInfo)
-# fl <- "http://www.census.gov/geo/cob/bdy/co/co90e00/co37_d90_e00.zip"
-# download.file(fl, "co37_d90_e00.zip")
-# e00 <- zip.file.extract("co37_d90.e00", "co37_d90_e00.zip")
-# e00toavc(e00, "ncar")
-# arc <- get.arcdata(".", "ncar")
-#res <- arcobj2SLDF(arc)
-#plot(res)
-#invisible(title(""))
-res <- ContourLines2SLDF(contourLines(volcano))
-plot(res, col=terrain.colors(nrow(as(res, "data.frame"))))
-title("Volcano contours as SpatialLines")
-
-
-
-cleanEx()
-nameEx("GE_SpatialGrid")
-### * GE_SpatialGrid
-
-flush(stderr()); flush(stdout())
-
-### Name: GE_SpatialGrid
-### Title: Create SpatialGrid for PNG output to GE
-### Aliases: GE_SpatialGrid Sobj_SpatialGrid
-### Keywords: spatial
-
-### ** Examples
-
-opt_exask <- options(example.ask=FALSE)
-qk <- SpatialPointsDataFrame(quakes[, c(2:1)], quakes)
-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")
-tf <- tempfile()
-SGqk <- GE_SpatialGrid(qk)
-png(file=paste(tf, ".png", sep=""), width=SGqk$width, height=SGqk$height,
- bg="transparent")
-par(mar=c(0,0,0,0), xaxs="i", yaxs="i")
-plot(qk, xlim=SGqk$xlim, ylim=SGqk$ylim, setParUsrBB=TRUE)
-dev.off()
-kmlOverlay(SGqk, paste(tf, ".kml", sep=""), paste(tf, ".png", sep=""))
-## Not run:
-##D qk0 <- quakes
-##D qk0$long <- ifelse(qk0$long <= 180, qk0$long, qk0$long-360)
-##D qk0a <- SpatialPointsDataFrame(qk0[, c(2:1)], qk0)
-##D proj4string(qk0a) <- CRS("+proj=longlat")
-##D writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
-##D system(paste("googleearth ", tf, ".kml", sep=""))
-## End(Not run)
-options(example.ask=opt_exask)
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("Rgshhs")
-### * Rgshhs
-
-flush(stderr()); flush(stdout())
-
-### Name: Rgshhs
-### Title: Read GSHHS data into sp object
-### Aliases: Rgshhs getRgshhsMap
-### Keywords: spatial
-
-### ** Examples
-
-if (!rgeosStatus()) gpclibPermit()
-gshhs.c.b <- system.file("share/gshhs_c.b", package="maptools")
-WEx <- c(-12, 3)
-WEy <- c(48, 59)
-WE <- getRgshhsMap(gshhs.c.b, xlim=WEx, ylim=WEy)
-plot(WE, col="khaki", xlim=WEx, ylim=WEy, xaxs="i", yaxs="i", axes=TRUE)
-NZx <- c(160,180)
-NZy <- c(-50,-30)
-NZ <- Rgshhs(gshhs.c.b, xlim=NZx, ylim=NZy)
-plot(NZ$SP, col="khaki", pbg="azure2", xlim=NZx, ylim=NZy, xaxs="i", yaxs="i", axes=TRUE)
-GLx <- c(265,285)
-GLy <- c(40,50)
-GL <- Rgshhs(gshhs.c.b, xlim=GLx, ylim=GLy)
-plot(GL$SP, col="khaki", pbg="azure2", xlim=GLx, ylim=GLy, xaxs="i", yaxs="i", axes=TRUE)
-BNLx <- c(2,8)
-BNLy <- c(49,54)
-wdb_lines <- system.file("share/wdb_borders_c.b", package="maptools")
-BNLp <- Rgshhs(gshhs.c.b, xlim=BNLx, ylim=BNLy)
-BNLl <- Rgshhs(wdb_lines, xlim=BNLx, ylim=BNLy)
-plot(BNLp$SP, col="khaki", pbg="azure2", xlim=BNLx, ylim=BNLy, xaxs="i", yaxs="i", axes=TRUE)
-lines(BNLl$SP)
-xlims <- c(0,360)
-ylims <- c(-90,90)
-world <- Rgshhs(gshhs.c.b, xlim=xlims, ylim=ylims, level=1, checkPolygons=TRUE)
-
-
-
-cleanEx()
-nameEx("SpatialLines2PolySet")
-### * SpatialLines2PolySet
-
-flush(stderr()); flush(stdout())
-
-### Name: SpatialLines2PolySet
-### Title: Convert sp line and polygon objects to PBSmapping PolySet
-### objects
-### Aliases: SpatialLines2PolySet SpatialPolygons2PolySet
-### PolySet2SpatialPolygons PolySet2SpatialLines
-### Keywords: spatial
-
-### ** Examples
-
-if(require(PBSmapping)) {
-if(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"))
-nor_coast_lines_PS <- SpatialLines2PolySet(nor_coast_lines_sp)
-summary(nor_coast_lines_PS)
-plotLines(nor_coast_lines_PS)
-o3 <- PolySet2SpatialLines(nor_coast_lines_PS)
-plot(o3, axes=TRUE)
-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"))
-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)
-}}
-
-
-
-cleanEx()
-nameEx("SpatialLinesMidPoints")
-### * SpatialLinesMidPoints
-
-flush(stderr()); flush(stdout())
-
-### Name: SpatialLinesMidPoints
-### Title: Line midpoints
-### Aliases: SpatialLinesMidPoints
-### Keywords: spatial
-
-### ** Examples
-
-xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
- proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
-plot(xx, col="blue")
-spdf <- SpatialLinesMidPoints(xx)
-plot(spdf, col="orange", add=TRUE)
-
-
-
-cleanEx()
-nameEx("SplashDams")
-### * SplashDams
-
-flush(stderr()); flush(stdout())
-
-### Name: SplashDams
-### Title: Data for Splash Dams in western Oregon
-### Aliases: SplashDams
-### Keywords: datasets
-
-### ** Examples
-
-data(SplashDams)
-plot(SplashDams, axes=TRUE)
-
-
-
-cleanEx()
-nameEx("as.ppp")
-### * as.ppp
-
-flush(stderr()); flush(stdout())
-
-### Name: as.ppp
-### Title: coercion between sp objects and spatstat objects
-### Aliases: as.owin.SpatialGridDataFrame as.owin.SpatialPixelsDataFrame
-### as.owin.SpatialPolygons as.im.SpatialGridDataFrame
-### coerce,SpatialGridDataFrame,owin-method
-### coerce,SpatialPixelsDataFrame,owin-method
-### coerce,SpatialPolygons,owin-method as.SpatialPolygons.tess
-### as.SpatialPolygons.owin coerce,tess,SpatialPolygons-method
-### coerce,owin,SpatialPolygons-method
-### coerce,SpatialGridDataFrame,im-method as.ppp.SpatialGridDataFrame
-### as.ppp.SpatialPoints as.ppp.SpatialPointsDataFrame
-### coerce,SpatialPoints,ppp-method
-### coerce,SpatialPointsDataFrame,ppp-method as.psp.Line as.psp.Lines
-### as.psp.SpatialLines as.psp.SpatialLinesDataFrame
-### coerce,Line,psp-method coerce,Lines,psp-method
-### coerce,SpatialLines,psp-method
-### coerce,SpatialLinesDataFrame,psp-method as.SpatialLines.psp
-### coerce,psp,SpatialLines-method coerce,im,SpatialGridDataFrame-method
-### coerce,ppp,SpatialGridDataFrame-method
-### coerce,ppp,SpatialPointsDataFrame-method
-### coerce,ppp,SpatialPoints-method as.SpatialPointsDataFrame.ppp
-### as.SpatialGridDataFrame.ppp as.SpatialPoints.ppp
-### as.SpatialGridDataFrame.im
-### Keywords: spatial
-
-### ** Examples
-
-library(spatstat)
-data(meuse)
-coordinates(meuse) = ~x+y
-zn1 <- as(meuse["zinc"], "ppp")
-zn1
-plot(zn1)
-as(as(meuse, "SpatialPoints"), "ppp")
-data(meuse.grid)
-gridded(meuse.grid) = ~x+y
-mg_owin <- as(meuse.grid, "owin")
-zn1a <- ppp(x=zn1$x, y=zn1$y, marks=zn1$marks, window=mg_owin)
-zn1a
-plot(zn1a)
-rev_ppp_SP <- as.SpatialPoints.ppp(zn1a)
-summary(rev_ppp_SP)
-rev_ppp_SPDF <- as.SpatialPointsDataFrame.ppp(zn1a)
-summary(rev_ppp_SPDF)
-rev_ppp_SGDF <- as.SpatialGridDataFrame.ppp(zn1a)
-summary(rev_ppp_SGDF)
-data(meuse.riv)
-mr <- Line(meuse.riv)
-mr_psp <- as(mr, "psp")
-mr_psp
-plot(mr_psp)
-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
-plot(xx_psp)
-xx_back <- as(xx_psp, "SpatialLines")
-plot(xx_back)
-mg_owin <- as(as(meuse.grid["ffreq"], "SpatialPixelsDataFrame"), "owin")
-mg_owin
-ho_sp <- SpatialPolygons(list(Polygons(list(Polygon(cbind(c(0,1,1,0,0),
- c(0,0,1,1,0))), Polygon(cbind(c(0.6,0.4,0.4,0.6,0.6),
- c(0.2,0.2,0.4,0.4,0.2)), hole=TRUE)), ID="ho")))
-plot(ho_sp, col="red", pbg="pink")
-ho <- as(ho_sp, "owin")
-plot(ho)
-pp <- runifpoint(500, win=ho)
-plot(pp)
-ho_orig <- owin(poly=list(list(x=c(0,1,1,0), y=c(0,0,1,1)),
- list(x=c(0.6,0.4,0.4,0.6), y=c(0.2,0.2,0.4,0.4))))
-identical(ho, ho_orig)
-ho_sp1 <- as(ho, "SpatialPolygons")
-all.equal(ho_sp, ho_sp1, check.attributes=FALSE)
-A <- tess(xgrid=0:4,ygrid=0:4)
-A_sp <- as(A, "SpatialPolygons")
-plot(A_sp)
-text(coordinates(A_sp), labels=row.names(A_sp), cex=0.6)
-mg_dist <- meuse.grid["dist"]
-fullgrid(mg_dist) <- TRUE
-image(mg_dist, axes=TRUE)
-mg_im <- as(mg_dist, "im")
-plot(mg_im)
-mg2 <- as.SpatialGridDataFrame.im(mg_im)
-image(mg2, axes=TRUE)
-
-
-
-cleanEx()
-nameEx("asciigrid")
-### * asciigrid
-
-flush(stderr()); flush(stdout())
-
-### Name: readAsciiGrid
-### Title: read/write to/from (ESRI) asciigrid format
-### Aliases: readAsciiGrid writeAsciiGrid
-### Keywords: programming
-
-### ** Examples
-
-x <- readAsciiGrid(system.file("grids/test.ag", package="maptools")[1])
-summary(x)
-image(x)
-xp <- as(x, "SpatialPixelsDataFrame")
-abline(h=332000, lwd=3)
-xpS <- xp[coordinates(xp)[,2] < 332000,]
-summary(xpS)
-xS <- as(xpS, "SpatialGridDataFrame")
-summary(xS)
-tmpfl <- paste(tempdir(), "testS.ag", sep="/")
-writeAsciiGrid(xS, tmpfl)
-axS <- readAsciiGrid(tmpfl)
-opar <- par(mfrow=c(1,2))
-image(xS, main="before export")
-image(axS, main="after import")
-par(opar)
-unlink(tmpfl)
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("checkPolygonsHoles")
-### * checkPolygonsHoles
-
-flush(stderr()); flush(stdout())
-
-### Name: checkPolygonsHoles
-### Title: Check holes in Polygons objects
-### Aliases: checkPolygonsHoles rgeosStatus gpclibPermit gpclibPermitStatus
-### Keywords: spatial
-
-### ** Examples
-
-if (!rgeosStatus()) gpclibPermit()
-nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- proj4string=CRS("+proj=longlat +ellps=clrk66"))
-pl <- slot(nc1, "polygons")
-sapply(slot(pl[[4]], "Polygons"), function(x) slot(x, "hole"))
-pl[[4]] <- Polygons(list(slot(pl[[4]], "Polygons")[[1]],
- Polygon(slot(slot(pl[[4]], "Polygons")[[2]], "coords"), hole=TRUE),
- slot(pl[[4]], "Polygons")[[3]]), slot(pl[[4]], "ID"))
-sapply(slot(pl[[4]], "Polygons"), function(x) slot(x, "hole"))
-pl_new <- lapply(pl, checkPolygonsHoles)
-sapply(slot(pl_new[[4]], "Polygons"), function(x) slot(x, "hole"))
-srs <- slot(slot(pl[[1]], "Polygons")[[1]], "coords")
-hle2 <- structure(c(-81.64093, -81.38380, -81.34165, -81.66833, -81.64093,
- 36.57865, 36.57234, 36.47603, 36.47894, 36.57865), .Dim = as.integer(c(5, 2)))
-hle3 <- structure(c(-81.47759, -81.39118, -81.38486, -81.46705, -81.47759,
- 36.56289, 36.55659, 36.49907, 36.50380, 36.56289), .Dim = as.integer(c(5, 2)))
-x <- Polygons(list(Polygon(srs), Polygon(hle2), Polygon(hle3)),
- ID=slot(pl[[1]], "ID"))
-sapply(slot(x, "Polygons"), function(x) slot(x, "hole"))
-res <- checkPolygonsHoles(x)
-sapply(slot(res, "Polygons"), function(x) slot(x, "hole"))
-## Not run:
-##D opar <- par(mfrow=c(1,2))
-##D SPx <- SpatialPolygons(list(x))
-##D plot(SPx)
-##D text(t(sapply(slot(x, "Polygons"), function(i) slot(i, "labpt"))),
-##D labels=sapply(slot(x, "Polygons"), function(i) slot(i, "hole")), cex=0.6)
-##D title(xlab="Hole slot values before checking")
-##D SPres <- SpatialPolygons(list(res))
-##D plot(SPres)
-##D text(t(sapply(slot(res, "Polygons"), function(i) slot(i, "labpt"))),
-##D labels=sapply(slot(res, "Polygons"), function(i) slot(i, "hole")), cex=0.6)
-##D title(xlab="Hole slot values after checking")
-##D par(opar)
-##D p1 <- Polygon(cbind(x=c(0, 0, 10, 10, 0), y=c(0, 10, 10, 0, 0))) # I
-##D p2 <- Polygon(cbind(x=c(3, 3, 7, 7, 3), y=c(3, 7, 7, 3, 3))) # H
-##D p8 <- Polygon(cbind(x=c(1, 1, 2, 2, 1), y=c(1, 2, 2, 1, 1))) # H
-##D p9 <- Polygon(cbind(x=c(1, 1, 2, 2, 1), y=c(5, 6, 6, 5, 5))) # H
-##D p3 <- Polygon(cbind(x=c(20, 20, 30, 30, 20), y=c(20, 30, 30, 20, 20))) # I
-##D p4 <- Polygon(cbind(x=c(21, 21, 29, 29, 21), y=c(21, 29, 29, 21, 21))) # H
-##D p14 <- Polygon(cbind(x=c(21, 21, 29, 29, 21), y=c(21, 29, 29, 21, 21))) # H
-##D p5 <- Polygon(cbind(x=c(22, 22, 28, 28, 22), y=c(22, 28, 28, 22, 22))) # I
-##D p15 <- Polygon(cbind(x=c(22, 22, 28, 28, 22), y=c(22, 28, 28, 22, 22))) # I
-##D p6 <- Polygon(cbind(x=c(23, 23, 27, 27, 23), y=c(23, 27, 27, 23, 23))) # H
-##D p7 <- Polygon(cbind(x=c(13, 13, 17, 17, 13), y=c(13, 17, 17, 13, 13))) # I
-##D p10 <- Polygon(cbind(x=c(24, 24, 26, 26, 24), y=c(24, 26, 26, 24, 24))) # I
-##D p11 <- Polygon(cbind(x=c(24.25, 24.25, 25.75, 25.75, 24.25),
-##D y=c(24.25, 25.75, 25.75, 24.25, 24.25))) # H
-##D p12 <- Polygon(cbind(x=c(24.5, 24.5, 25.5, 25.5, 24.5),
-##D y=c(24.5, 25.5, 25.5, 24.5, 24.5))) # I
-##D p13 <- Polygon(cbind(x=c(24.75, 24.75, 25.25, 25.25, 24.75),
-##D y=c(24.75, 25.25, 25.25, 24.75, 24.75))) # H
-##D lp <- list(p1, p2, p13, p7, p6, p5, p4, p3, p8, p11, p12, p9, p10, p14, p15)
-##D # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-##D # 0 1 11 0 6 0 8 0 1 13 0 1 0 (7) (6)
-##D # I H H I H I H I H H I H I ? ?
-##D pls <- Polygons(lp, ID="1")
-##D comment(pls)
-##D pls1 <- checkPolygonsHoles(pls)
-##D comment(pls1)
-##D opar <- par(mfrow=c(1,2))
-##D plot(SpatialPolygons(list(pls)), col="magenta", pbg="cyan", usePolypath=FALSE)
-##D title(xlab="Hole slot values before checking")
-##D plot(SpatialPolygons(list(pls1)), col="magenta", pbg="cyan", usePolypath=FALSE)
-##D title(xlab="Hole slot values after checking")
-##D par(opar)
-## End(Not run)
-
-
-
-cleanEx()
-nameEx("dotsInPolys")
-### * dotsInPolys
-
-flush(stderr()); flush(stdout())
-
-### Name: dotsInPolys
-### Title: Put dots in polygons
-### Aliases: dotsInPolys
-### Keywords: spatial
-
-### ** Examples
-
-nc_SP <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- proj4string=CRS("+proj=longlat +ellps=clrk66"))
-## Not run:
-##D library(spgpc)
-##D pls <- slot(nc_SP, "polygons")
-##D pls_new <- lapply(pls, checkPolygonsHoles)
-##D nc_SP <- SpatialPolygonsDataFrame(SpatialPolygons(pls_new,
-##D proj4string=CRS(proj4string(nc_SP))), data=as(nc_SP, "data.frame"))
-## End(Not run)
-try1 <- dotsInPolys(nc_SP, as.integer(nc_SP$SID74))
-plot(nc_SP, axes=TRUE)
-plot(try1, add=TRUE, pch=18, col="red")
-try2 <- dotsInPolys(nc_SP, as.integer(nc_SP$SID74), f="regular")
-plot(nc_SP, axes=TRUE)
-plot(try2, add=TRUE, pch=18, col="red")
-
-
-
-cleanEx()
-nameEx("elide-methods")
-### * elide-methods
-
-flush(stderr()); flush(stdout())
-
-### Name: elide-methods
-### Title: Methods for Function elide in Package 'maptools'
-### Aliases: elide-methods elide,SpatialPoints-method
-### elide,SpatialPointsDataFrame-method elide,SpatialLines-method
-### elide,SpatialLinesDataFrame-method elide,SpatialPolygons-method
-### elide,SpatialPolygonsDataFrame-method elide
-### Keywords: methods spatial
-
-### ** Examples
-
-data(meuse)
-coordinates(meuse) <- c("x", "y")
-proj4string(meuse) <- CRS("+init=epsg:28992")
-data(meuse.riv)
-river_polygon <- Polygons(list(Polygon(meuse.riv)), ID="meuse")
-rivers <- SpatialPolygons(list(river_polygon))
-proj4string(rivers) <- CRS("+init=epsg:28992")
-rivers1 <- elide(rivers, reflect=c(TRUE, TRUE), scale=TRUE)
-meuse1 <- elide(meuse, bb=bbox(rivers), reflect=c(TRUE, TRUE), scale=TRUE)
-opar <- par(mfrow=c(1,2))
-plot(rivers, axes=TRUE)
-plot(meuse, add=TRUE)
-plot(rivers1, axes=TRUE)
-plot(meuse1, add=TRUE)
-par(opar)
-meuse1 <- elide(meuse, shift=c(10000, -10000))
-bbox(meuse)
-bbox(meuse1)
-rivers1 <- elide(rivers, shift=c(10000, -10000))
-bbox(rivers)
-bbox(rivers1)
-meuse1 <- elide(meuse, rotate=-30, center=apply(bbox(meuse), 1, mean))
-bbox(meuse)
-bbox(meuse1)
-plot(meuse1, axes=TRUE)
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("gcDestination")
-### * gcDestination
-
-flush(stderr()); flush(stdout())
-
-### Name: gcDestination
-### Title: Find destination in geographical coordinates
-### Aliases: gcDestination
-### Keywords: spatial
-
-### ** Examples
-
-data(state)
-res <- gcDestination(state.center$x, state.center$y, 45, 250, "km")
-plot(state.center$x, state.center$y, asp=1, pch=16)
-arrows(state.center$x, state.center$y, res[,1], res[,2], length=0.05)
-llist <- vector(mode="list", length=length(state.center$x))
-for (i in seq(along=llist)) llist[[i]] <- gcDestination(state.center$x[i],
- state.center$y[i], seq(0, 360, 5), 250, "km")
-plot(state.center$x, state.center$y, asp=1, pch=3)
-nll <- lapply(llist, lines)
-
-
-
-cleanEx()
-nameEx("getKMLcoordinates")
-### * getKMLcoordinates
-
-flush(stderr()); flush(stdout())
-
-### Name: getKMLcoordinates
-### Title: Get a list of coordinates out of a KML file
-### Aliases: getKMLcoordinates
-### Keywords: spatial
-
-### ** Examples
-
-data(wrld_simpl)
-## creates a KML file containing the polygons of South Africa (plus hole)
-sw <- slot(wrld_simpl[wrld_simpl$NAME=="South Africa",], "polygons")[[1]]
-tf <- tempfile()
-kmlPolygon(sw, kmlfile=tf, name="South Africa", col="#df0000aa", lwd=5,
- border=4, kmlname="R Test",
- kmldescription="This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
-zz <- getKMLcoordinates(tf, ignoreAltitude=TRUE)
-str(zz)
-
-
-
-cleanEx()
-nameEx("getinfo.shape")
-### * getinfo.shape
-
-flush(stderr()); flush(stdout())
-
-### Name: getinfo.shape
-### Title: Get shapefile header information
-### Aliases: getinfo.shape print.shapehead
-### Keywords: spatial
-
-### ** Examples
-
-res <- getinfo.shape(system.file("shapes/fylk-val.shp", package="maptools")[1])
-res
-str(res)
-
-
-
-cleanEx()
-nameEx("gzAzimuth")
-### * gzAzimuth
-
-flush(stderr()); flush(stdout())
-
-### Name: gzAzimuth
-### Title: Find azimuth for geographical coordinates
-### Aliases: gzAzimuth trackAzimuth
-### Keywords: spatial
-
-### ** Examples
-
-name <- c("Mecca", "Anchorage", "Washington")
-long <- c(39.823333, -149.883333, -77.0166667)
-lat <- c(21.423333, 61.2166667, 38.9)
-x <- cbind(long, lat)
-row.names(x) <- name
-crib <- c(-9.098363, 56.575960)
-r1 <- gzAzimuth(x[2:3,], x[1,])
-r1
-all.equal(r1, crib)
-r2 <- gzAzimuth(x[2:3,], x[1,], type="abdali")
-r2
-all.equal(r2, crib)
-trackAzimuth(x)
-
-
-
-cleanEx()
-nameEx("holepolys")
-### * holepolys
-
-flush(stderr()); flush(stdout())
-
-### Name: gpcholes
-### Title: Hisaji Ono's lake/hole problem
-### Aliases: gpcholes h1pl h2pl
-### Keywords: datasets
-
-### ** Examples
-
-data(gpcholes)
-opar <- par(mfrow=c(1,2))
-plot(SpatialPolygons(list(h2pl)), col="red", pbg="white", border="blue")
-plot(SpatialPolygons(list(h1pl)), col="red", pbg="white", border="blue")
-par(opar)
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("kmlLine")
-### * kmlLine
-
-flush(stderr()); flush(stdout())
-
-### Name: kmlLine
-### Title: Create and write a KML file on the basis of a given Lines object
-### Aliases: kmlLine
-### Keywords: spatial
-
-### ** Examples
-
-xx <- readShapeSpatial(system.file("shapes/fylk-val-ll.shp",
- package="maptools")[1], proj4string=CRS("+proj=longlat"))
-out <- sapply(slot(xx, "lines"), function(x) { kmlLine(x,
- name=slot(x, "ID"), col="blue", lwd=1.5,
- description=paste("river:", slot(x, "ID"))) })
-tf <- tempfile()
-kmlFile <- file(tf, "w")
-tf
-cat(kmlLine(kmlname="R Test", kmldescription="<i>Hello</i>")$header,
- file=kmlFile, sep="\n")
-cat(unlist(out["style",]), file=kmlFile, sep="\n")
-cat(unlist(out["content",]), file=kmlFile, sep="\n")
-cat(kmlLine()$footer, file=kmlFile, sep="\n")
-close(kmlFile)
-
-
-
-cleanEx()
-nameEx("kmlOverlay")
-### * kmlOverlay
-
-flush(stderr()); flush(stdout())
-
-### Name: kmlOverlay
-### Title: Create and write KML file for PNG image overlay
-### Aliases: kmlOverlay
-### Keywords: spatial
-
-### ** Examples
-
-opt_exask <- options(example.ask=FALSE)
-qk <- SpatialPointsDataFrame(quakes[, c(2:1)], quakes)
-proj4string(qk) <- CRS("+proj=longlat")
-tf <- tempfile()
-SGqk <- GE_SpatialGrid(qk)
-png(file=paste(tf, ".png", sep=""), width=SGqk$width, height=SGqk$height,
- bg="transparent")
-par(mar=c(0,0,0,0), xaxs="i", yaxs="i")
-plot(qk, xlim=SGqk$xlim, ylim=SGqk$ylim, setParUsrBB=TRUE)
-dev.off()
-kmlOverlay(SGqk, paste(tf, ".kml", sep=""), paste(tf, ".png", sep=""))
-## Not run:
-##D library(rgdal)
-##D qk0 <- quakes
-##D qk0$long <- ifelse(qk0$long <= 180, qk0$long, qk0$long-360)
-##D qk0a <- SpatialPointsDataFrame(qk0[, c(2:1)], qk0)
-##D proj4string(qk0a) <- CRS("+proj=longlat")
-##D writeOGR(qk0a, paste(tf, "v.kml", sep=""), "Quakes", "KML")
-##D system(paste("googleearth ", tf, ".kml", sep=""))
-## End(Not run)
-options(example.ask=opt_exask)
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("kmlPoints")
-### * kmlPoints
-
-flush(stderr()); flush(stdout())
-
-### Name: kmlPoints
-### Title: Create and write a KML file on the basis of a given Points
-### object
-### Aliases: kmlPoints
-### Keywords: spatial
-
-### ** Examples
-
-data(SplashDams)
-num <- length(SplashDams)
-td <- tempdir()
-kmlfile <- paste(td, "OregonSplashDams.kml", sep="/")
-kmlname <- "Oregon Splash Dams"
-kmldescription <- "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"
-name <- paste("Dam on",SplashDams$streamName)
-description <- paste("<b>owner:</b>",SplashDams$owner,"<br><b>dates:</b>",SplashDams$datesUsed)
-
-kmlPoints(SplashDams, kmlfile=kmlfile, name=name, description=description,
- icon=icon, kmlname=kmlname, kmldescription=kmldescription)
-
-
-
-cleanEx()
-nameEx("kmlPolygon")
-### * kmlPolygon
-
-flush(stderr()); flush(stdout())
-
-### Name: kmlPolygon
-### Title: Create and write a KML file on the basis of a given Polygons
-### object
-### Aliases: kmlPolygon
-### Keywords: spatial
-
-### ** Examples
-
-data(wrld_simpl)
-## creates a KML file containing the polygons of South Africa (plus hole)
-sw <- slot(wrld_simpl[wrld_simpl$NAME=="South Africa",], "polygons")[[1]]
-tf <- tempfile()
-kmlPolygon(sw, kmlfile=tf, name="South Africa", col="#df0000aa", lwd=5,
- border=4, kmlname="R Test",
- kmldescription="This is <b>only</b> a <a href='http://www.r-project.org'>R</a> test.")
-tf
-
-## creates a KML file containing the polygons of South Africa, Switzerland, and Canada
-sw <- wrld_simpl[wrld_simpl$NAME %in% c("South Africa", "Switzerland", "Canada"),]
-out <- sapply(slot(sw, "polygons"), function(x) { kmlPolygon(x,
- name=as(sw, "data.frame")[slot(x, "ID"), "NAME"],
- col="red", lwd=1.5, border='black',
- description=paste("ISO3:", slot(x, "ID"))) })
-tf <- tempfile()
-kmlFile <- file(tf, "w")
-tf
-cat(kmlPolygon(kmlname="R Test", kmldescription="<i>Hello</i>")$header,
- file=kmlFile, sep="\n")
-cat(unlist(out["style",]), file=kmlFile, sep="\n")
-cat(unlist(out["content",]), file=kmlFile, sep="\n")
-cat(kmlPolygon()$footer, file=kmlFile, sep="\n")
-close(kmlFile)
-
-
-
-cleanEx()
-nameEx("leglabs")
-### * leglabs
-
-flush(stderr()); flush(stdout())
-
-### Name: leglabs
-### Title: Make legend labels
-### Aliases: leglabs
-### Keywords: spatial
-
-### ** Examples
-
-mappolys <- readShapeSpatial(system.file("shapes/columbus.shp", package="maptools")[1], ID="NEIGNO")
-brks <- round(quantile(mappolys$CRIME, probs=seq(0,1,0.2)), digits=2)
-colours <- c("salmon1", "salmon2", "red3", "brown", "black")
-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")))
-
-
-
-cleanEx()
-nameEx("lineLabel")
-### * lineLabel
-
-flush(stderr()); flush(stdout())
-
-### Name: lineLabel
-### Title: Line label placement with spplot and lattice.
-### Aliases: lineLabel sp.lineLabel label sp.lineLabel-methods
-### label-methods sp.lineLabel,Lines-method
-### sp.lineLabel,SpatialLines-method label,SpatialLines-method
-
-### ** Examples
-
-data(meuse.grid)
-coordinates(meuse.grid) = ~x+y
-proj4string(meuse.grid) <- CRS("+init=epsg:28992")
-gridded(meuse.grid) = TRUE
-
-data(meuse)
-coordinates(meuse) = ~x+y
-data(meuse.riv)
-meuse.sl <- SpatialLines(list(Lines(list(Line(meuse.riv)), "1")))
-
-library(RColorBrewer)
-myCols <- adjustcolor(colorRampPalette(brewer.pal(n=9, 'Reds'))(100), .85)
-
-labs <- label(meuse.sl, 'Meuse River')
-
-## Maximum depth
-sl1 <- list('sp.lineLabel', meuse.sl, label=labs,
- position='below', textloc='maxDepth',
- spar=.2,
- col='darkblue', cex=1,
- fontfamily='Palatino',
- fontface=2)
-
-spplot(meuse.grid["dist"],
- col.regions=myCols,
- sp.layout = sl1)
-
-## Constant slope
-sl2 <- modifyList(sl1, list(textloc = 'constantSlope')) ## Default
-
-spplot(meuse.grid["dist"],
- col.regions=myCols,
- sp.layout = sl2)
-
-## Location defined by its numeric index
-sl3 <- modifyList(sl1, list(textloc = 140, position='above'))
-
-spplot(meuse.grid["dist"],
- col.regions=myCols,
- sp.layout = sl3)
-
-
-
-
-cleanEx()
-nameEx("map2SpatialPolygons")
-### * map2SpatialPolygons
-
-flush(stderr()); flush(stdout())
-
-### Name: map2SpatialPolygons
-### Title: Convert map objects to sp classes
-### Aliases: map2SpatialPolygons map2SpatialLines pruneMap
-### Keywords: spatial
-
-### ** Examples
-
-if(require(maps)) {
-nor_coast_poly <- map("world", "norway", fill=TRUE, col="transparent",
- plot=FALSE)
-range(nor_coast_poly$x, na.rm=TRUE)
-range(nor_coast_poly$y, na.rm=TRUE)
-nor_coast_poly <- map("world", "norway", fill=TRUE, col="transparent",
- plot=FALSE, ylim=c(58,72))
-nor_coast_poly$names
-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"))
-sapply(slot(nor_coast_poly_sp, "polygons"),
- function(x) length(slot(x, "Polygons")))
-plot(nor_coast_poly_sp, col="grey", axes=TRUE)
-nor_coast_lines <- map("world", interior=FALSE, plot=FALSE, xlim=c(4,32),
- ylim=c(58,72))
-plot(nor_coast_lines, type="l")
-nor_coast_lines <- pruneMap(nor_coast_lines, xlim=c(4,32), ylim=c(58,72))
-lines(nor_coast_lines, col="red")
-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)
-}
-
-
-
-cleanEx()
-nameEx("nearestPointOnLine")
-### * nearestPointOnLine
-
-flush(stderr()); flush(stdout())
-
-### Name: nearestPointOnLine
-### Title: Get the nearest point on a line to a given point
-### Aliases: nearestPointOnLine
-### Keywords: spatial
-
-### ** Examples
-
-coordsLine = cbind(c(1,2,3),c(3,2,2))
-coordsPoint = c(1.2,1.5)
-nearestPointOnLine(coordsLine, coordsPoint)
-
-
-
-cleanEx()
-nameEx("nearestPointOnSegment")
-### * nearestPointOnSegment
-
-flush(stderr()); flush(stdout())
-
-### Name: nearestPointOnSegment
-### Title: Get the nearest point on a segment to a given point
-### Aliases: nearestPointOnSegment
-### Keywords: spatial
-
-### ** Examples
-
-segment = cbind(c(1,2),c(1,1.5))
-point = c(1.2,1.5)
-nearestPointOnSegment(segment, point)
-
-
-
-cleanEx()
-nameEx("nowrapRecenter")
-### * nowrapRecenter
-
-flush(stderr()); flush(stdout())
-
-### Name: nowrapRecenter
-### Title: Break polygons at meridian for recentering
-### Aliases: nowrapRecenter nowrapSpatialPolygons
-### Keywords: spatial
-
-### ** Examples
-
-## Not run:
-##D if (!rgeosStatus()) gpclibPermit()
-##D library(maps)
-##D world <- map("world", fill=TRUE, col="transparent", plot=FALSE)
-##D worldSpP <- map2SpatialPolygons(world, world$names, CRS("+proj=longlat"))
-##D worldSpP <- worldSpP[-grep("Antarctica", row.names(worldSpP)),]
-##D # incomplete polygons
-##D worldSpP <- worldSpP[-grep("Ghana", row.names(worldSpP)),]
-##D # self-intersection mouth of Volta
-##D worldSpP <- worldSpP[-grep("UK:Great Britain", row.names(worldSpP)),]
-##D # self-intersection Humber estuary
-##D worldSpPr <- recenter(worldSpP)
-##D plot(worldSpPr)
-##D title("Pacific view without polygon splitting")
-##D worldSpPnr <- nowrapRecenter(worldSpP)
-##D plot(worldSpPnr)
-##D title("Pacific view with polygon splitting")
-## End(Not run)
-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"))
-bbox(SR)
-SRr <- recenter(SR)
-bbox(SRr)
-SRnr <- nowrapRecenter(SR)
-bbox(SRnr)
-
-
-
-cleanEx()
-nameEx("pal2SpatialPolygons")
-### * pal2SpatialPolygons
-
-flush(stderr()); flush(stdout())
-
-### Name: pal2SpatialPolygons
-### Title: Making SpatialPolygons objects from RArcInfo input
-### Aliases: pal2SpatialPolygons
-### Keywords: spatial
-
-### ** Examples
-
-nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], ID="FIPS")
-plot(nc1)
-text(coordinates(nc1), labels=row.names(nc1), cex=0.6)
-if(require(maps)){
-ncmap <- map("county", "north carolina", fill=TRUE, col="transparent",
- plot=FALSE)
-IDs <- sapply(strsplit(ncmap$names, "[,:]"), function(x) x[2])
-nc2 <- map2SpatialPolygons(ncmap, IDs)
-plot(nc2)
-text(coordinates(nc2), labels=row.names(nc2), cex=0.6)
-}
-if(require(RArcInfo)) {
-td <- tempdir()
-tmpcover <- paste(td, "nc", sep="/")
-if (!file.exists(tmpcover)) e00toavc(system.file("share/co37_d90.e00",
- package="maptools")[1], tmpcover)
-arc <- get.arcdata(td, "nc")
-pal <- get.paldata(td, "nc")
-pat <- get.tabledata(paste(td, "info", sep="/"), "NC.PAT")
-sapply(pal[[2]], function(x) length(x[[1]]))
-IDs <- paste(pat$ST[-1], pat$CO[-1], sep="")
-nc3 <- pal2SpatialPolygons(arc, pal, IDs=IDs)
-plot(nc3)
-text(coordinates(nc3), labels=row.names(nc3), cex=0.6)
-}
-
-
-
-cleanEx()
-nameEx("pointLabelBase")
-### * pointLabelBase
-
-flush(stderr()); flush(stdout())
-
-### Name: pointLabel
-### Title: Label placement for points to avoid overlaps
-### Aliases: pointLabel
-### Keywords: aplot
-
-### ** Examples
-
-n <- 50
-x <- rnorm(n)*10
-y <- rnorm(n)*10
-plot(x, y, col = "red", pch = 20)
-pointLabel(x, y, as.character(round(x,5)), offset = 0, cex = .7)
-
-plot(x, y, col = "red", pch = 20)
-pointLabel(x, y, expression(over(alpha, beta[123])), offset = 0, cex = .8)
-
-
-
-
-cleanEx()
-nameEx("pointLabelLattice")
-### * pointLabelLattice
-
-flush(stderr()); flush(stdout())
-
-### Name: panel.pointLabel
-### Title: Label placement with spplot and lattice.
-### Aliases: panel.pointLabel sp.pointLabel sp.pointLabel-methods
-### sp.pointLabel,SpatialPoints-method
-
-### ** Examples
-
-n <- 15
-x <- rnorm(n)*10
-y <- rnorm(n)*10
-labels <- as.character(round(x, 5))
-
-
-myTheme <- list(add.text=list(
- cex=0.7,
- col='midnightblue',
- fontface=2,
- fontfamily='mono'))
-
-xyplot(y~x,
- labels=labels,
- par.settings=myTheme,
- panel=function(x, y, labels, ...){
- panel.xyplot(x, y, ...)
- panel.pointLabel(x, y, labels=labels, ...)
- })
-
-
-
-data(meuse.grid)
-coordinates(meuse.grid) = ~x+y
-proj4string(meuse.grid) <- CRS("+init=epsg:28992")
-gridded(meuse.grid) = TRUE
-
-library(RColorBrewer)
-myCols <- adjustcolor(colorRampPalette(brewer.pal(n=9, 'Reds'))(100), .85)
-
-pts <- spsample(meuse.grid, n=15, type="random")
-
-Rauthors <- readLines(file.path(R.home("doc"), "AUTHORS"))[9:28]
-someAuthors <- Rauthors[seq_along(pts)]
-
-sl1 <- list('sp.points', pts, pch=19, cex=.8, col='midnightblue')
-sl2 <- list('sp.pointLabel', pts, label=someAuthors,
- cex=0.7, col='midnightblue',
- fontfamily='Palatino')
-
-spplot(meuse.grid["dist"], col.regions=myCols, sp.layout=list(sl1, sl2))
-
-
-
-cleanEx()
-nameEx("readGPS")
-### * readGPS
-
-flush(stderr()); flush(stdout())
-
-### Name: readGPS
-### Title: GPSbabel read interface
-### Aliases: readGPS
-### Keywords: spatial
-
-### ** Examples
-
-## Not run:
-##D b1 <- readGPS(f="usb:")
-##D str(b1)
-##D b2 <- b1[1:172,]
-##D wp0 <- b2[,c(2,3,4,8,9,19)]
-##D str(wp0)
-##D wp0$long <- wp0$V9
-##D wp0$lat <- as.numeric(as.character(wp0$V8))
-##D wp0$id <- as.character(wp0$V2)
-##D wp0$alt <- as.numeric(substring(as.character(wp0$V19), 1,
-##D (nchar(as.character(wp0$V19))-1)))
-##D wp0$time <- as.POSIXct(strptime(paste(as.character(wp0$V3),
-##D as.character(wp0$V4)), format="%d-%b-%y %H:%M:%S"))
-##D str(wp0)
-##D wp1 <- wp0[,-(1:6)]
-##D str(wp1)
-##D summary(wp1)
-## End(Not run)
-
-
-
-cleanEx()
-nameEx("readShapeLines")
-### * readShapeLines
-
-flush(stderr()); flush(stdout())
-
-### Name: readShapeLines
-### Title: Read arc shape files into SpatialLinesDataFrame objects
-### Aliases: readShapeLines writeLinesShape
-### Keywords: spatial
-
-### ** Examples
-
-xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
- proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
-plot(xx, col="blue")
-summary(xx)
-xxx <- xx[xx$LENGTH > 30000,]
-plot(xxx, col="red", add=TRUE)
-tmpfl <- paste(tempdir(), "xxline", sep="/")
-writeLinesShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-axx <- readShapeLines(tmpfl, proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
-plot(xxx, col="black", lwd=4)
-plot(axx, col="yellow", lwd=1, add=TRUE)
-unlink(paste(tmpfl, ".*", sep=""))
-xx <- readShapeLines(system.file("shapes/sids.shp", package="maptools")[1],
- proj4string=CRS("+proj=longlat +datum=NAD27"))
-plot(xx, col="blue")
-
-
-
-cleanEx()
-nameEx("readShapePoints")
-### * readShapePoints
-
-flush(stderr()); flush(stdout())
-
-### Name: readShapePoints
-### Title: Read points shape files into SpatialPointsDataFrame objects
-### Aliases: readShapePoints writePointsShape
-### Keywords: spatial
-
-### ** Examples
-
-library(maptools)
-xx <- readShapePoints(system.file("shapes/baltim.shp", package="maptools")[1])
-plot(xx)
-summary(xx)
-xxx <- xx[xx$PRICE < 40,]
-tmpfl <- paste(tempdir(), "xxpts", sep="/")
-writePointsShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-axx <- readShapePoints(tmpfl)
-plot(axx, col="red", add=TRUE)
-unlink(paste(tmpfl, ".*", sep=""))
-xx <- readShapePoints(system.file("shapes/pointZ.shp", package="maptools")[1])
-dimensions(xx)
-plot(xx)
-summary(xx)
-
-
-
-cleanEx()
-nameEx("readShapePoly")
-### * readShapePoly
-
-flush(stderr()); flush(stdout())
-
-### Name: readShapePoly
-### Title: Read polygon shape files into SpatialPolygonsDataFrame objects
-### Aliases: readShapePoly writePolyShape
-### Keywords: spatial
-
-### ** Examples
-
-library(maptools)
-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)
-text(coordinates(xx), labels=row.names(xx), cex=0.6)
-as(xx, "data.frame")[1:5, 1:6]
-xxx <- xx[xx$SID74 < 2,]
-plot(xxx, border="red", add=TRUE)
-tmpfl <- paste(tempdir(), "xxpoly", sep="/")
-writePolyShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-axx <- readShapePoly(tmpfl, proj4string=CRS("+proj=longlat +ellps=clrk66"))
-plot(xxx, border="black", lwd=4)
-plot(axx, border="yellow", lwd=1, add=TRUE)
-unlink(paste(tmpfl, ".*", sep=""))
-
-
-
-cleanEx()
-nameEx("readShapeSpatial")
-### * readShapeSpatial
-
-flush(stderr()); flush(stdout())
-
-### Name: readShapeSpatial
-### Title: Read shape files into Spatial*DataFrame objects
-### Aliases: readShapeSpatial writeSpatialShape
-### Keywords: spatial
-
-### ** Examples
-
-library(maptools)
-xx <- readShapeSpatial(system.file("shapes/sids.shp", package="maptools")[1],
- IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
-summary(xx)
-xxx <- xx[xx$SID74 < 2,]
-tmpfl <- paste(tempdir(), "xxpoly", sep="/")
-writeSpatialShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-unlink(paste(tmpfl, ".*", sep=""))
-xx <- readShapeSpatial(system.file("shapes/fylk-val.shp",
- package="maptools")[1], proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
-summary(xx)
-xxx <- xx[xx$LENGTH > 30000,]
-plot(xxx, col="red", add=TRUE)
-tmpfl <- paste(tempdir(), "xxline", sep="/")
-writeSpatialShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-unlink(paste(tmpfl, ".*", sep=""))
-xx <- readShapeSpatial(system.file("shapes/baltim.shp", package="maptools")[1])
-summary(xx)
-xxx <- xx[xx$PRICE < 40,]
-tmpfl <- paste(tempdir(), "xxpts", sep="/")
-writeSpatialShape(xxx, tmpfl)
-getinfo.shape(paste(tmpfl, ".shp", sep=""))
-unlink(paste(tmpfl, ".*", sep=""))
-
-
-
-cleanEx()
-nameEx("readSplus")
-### * readSplus
-
-flush(stderr()); flush(stdout())
-
-### Name: readSplus
-### Title: Read exported WinBUGS maps
-### Aliases: readSplus
-### Keywords: spatial
-
-### ** Examples
-
-geobugs <- readSplus(system.file("share/Splus.map", package="maptools"))
-plot(geobugs, axes=TRUE, col=1:3)
-row.names(geobugs)
-pls <- slot(geobugs, "polygons")
-sapply(pls, function(i) sapply(slot(i, "Polygons"), slot, "hole"))
-pls1 <- lapply(pls, checkPolygonsHoles)
-sapply(pls1, function(i) sapply(slot(i, "Polygons"), slot, "hole"))
-plot(SpatialPolygons(pls1), axes=TRUE, col=1:3)
-
-
-
-cleanEx()
-nameEx("snapPointsToLines")
-### * snapPointsToLines
-
-flush(stderr()); flush(stdout())
-
-### Name: snapPointsToLines
-### Title: Snap a set of points to a set of lines
-### Aliases: snapPointsToLines
-### Keywords: spatial
-
-### ** Examples
-
-# From the sp vignette
-l1 = cbind(c(1,2,3),c(3,2,2))
-l1a = cbind(l1[,1]+.05,l1[,2]+.05)
-l2 = cbind(c(1,2,3),c(1,1.5,1))
-Sl1 = Line(l1)
-Sl1a = Line(l1a)
-Sl2 = Line(l2)
-S1 = Lines(list(Sl1, Sl1a), ID="a")
-S2 = Lines(list(Sl2), ID="b")
-Sl = SpatialLines(list(S1,S2))
-df = data.frame(z = c(1,2), row.names=sapply(slot(Sl, "lines"), function(x) slot(x, "ID")))
-Sldf = SpatialLinesDataFrame(Sl, data = df)
-
-xc = c(1.2,1.5,2.5)
-yc = c(1.5,2.2,1.6)
-Spoints = SpatialPoints(cbind(xc, yc))
-
-snapPointsToLines(Spoints, Sldf)
-
-
-
-cleanEx()
-nameEx("sp2Mondrian")
-### * sp2Mondrian
-
-flush(stderr()); flush(stdout())
-
-### Name: sp2Mondrian
-### Title: write map data for Mondrian
-### Aliases: sp2Mondrian
-### Keywords: spatial
-
-### ** Examples
-
-## Not run:
-##D xx <- readShapePoly(system.file("shapes/columbus.shp", package="maptools")[1])
-##D sp2Mondrian(xx, file="columbus1.txt")
-##D xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1])
-##D sp2Mondrian(xx, file="sids1.txt")
-## End(Not run)
-
-
-
-cleanEx()
-nameEx("sp2WB")
-### * sp2WB
-
-flush(stderr()); flush(stdout())
-
-### Name: sp2WB
-### Title: Export SpatialPolygons object as S-Plus map for WinBUGS
-### Aliases: sp2WB
-### Keywords: spatial
-
-### ** Examples
-
-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)
-tf <- tempfile()
-sp2WB(as(xx, "SpatialPolygons"), filename=tf)
-xxx <- readSplus(tf, proj4string=CRS("+proj=longlat +ellps=clrk66"))
-all.equal(xxx, as(xx, "SpatialPolygons"), tolerance=.Machine$double.eps^(1/4),
- check.attributes=FALSE)
-## Not run:
-##D x <- readAsciiGrid(system.file("grids/test.ag", package="maptools")[1])
-##D xp <- as(x, "SpatialPixelsDataFrame")
-##D pp <- as.SpatialPolygons.SpatialPixels(xp)
-##D sp2WB(pp, filename="test.map")
-## End(Not run)
-
-
-
-cleanEx()
-nameEx("sp2tmap")
-### * sp2tmap
-
-flush(stderr()); flush(stdout())
-
-### Name: sp2tmap
-### Title: Convert SpatialPolygons object for Stata tmap command
-### Aliases: sp2tmap
-### Keywords: spatial
-
-### ** Examples
-
-## Not run:
-##D xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
-##D IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
-##D plot(xx, border="blue", axes=TRUE, las=1)
-##D tmapdf <- sp2tmap(as(xx, "SpatialPolygons"))
-##D write.dta(tmapdf, file="NCmap.dta", version=7)
-##D NCdf <- as(xx, "data.frame")
-##D NCdf$ID_n <- attr(tmapdf, "ID_names")
-##D write.dta(NCdf, file="NC.dta", version=7)
-## End(Not run)
-
-
-
-cleanEx()
-nameEx("spCbind-methods")
-### * spCbind-methods
-
-flush(stderr()); flush(stdout())
-
-### Name: spCbind-methods
-### Title: cbind for spatial objects
-### Aliases: spCbind-methods
-### spCbind,SpatialPointsDataFrame,data.frame-method
-### spCbind,SpatialPointsDataFrame,vector-method
-### spCbind,SpatialLinesDataFrame,data.frame-method
-### spCbind,SpatialLinesDataFrame,vector-method
-### spCbind,SpatialPolygonsDataFrame,data.frame-method
-### spCbind,SpatialPolygonsDataFrame,vector-method spCbind
-### Keywords: methods spatial
-
-### ** Examples
-
-xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
-xtra <- read.dbf(system.file("share/nc_xtra.dbf", package="maptools")[1])
-o <- match(xx$CNTY_ID, xtra$CNTY_ID)
-xtra1 <- xtra[o,]
-row.names(xtra1) <- xx$FIPSNO
-xx1 <- spCbind(xx, xtra1)
-names(xx1)
-identical(xx1$CNTY_ID, xx1$CNTY_ID.1)
-
-
-
-cleanEx()
-nameEx("spRbind-methods")
-### * spRbind-methods
-
-flush(stderr()); flush(stdout())
-
-### Name: spRbind-methods
-### Title: rbind for spatial objects
-### Aliases: spRbind-methods spRbind,SpatialPoints,SpatialPoints-method
-### spRbind,SpatialPointsDataFrame,SpatialPointsDataFrame-method
-### spRbind,SpatialLines,SpatialLines-method
-### spRbind,SpatialLinesDataFrame,SpatialLinesDataFrame-method
-### spRbind,SpatialPolygons,SpatialPolygons-method
-### spRbind,SpatialPolygonsDataFrame,SpatialPolygonsDataFrame-method
-### spRbind
-### Keywords: methods spatial
-
-### ** Examples
-
-xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
-summary(xx)
-xx$FIPSNO
-xx1 <- xx[xx$CNTY_ID < 1982,]
-xx2 <- xx[xx$CNTY_ID >= 1982,]
-xx3 <- spRbind(xx2, xx1)
-summary(xx3)
-xx3$FIPSNO
-
-
-
-cleanEx()
-nameEx("state.vbm")
-### * state.vbm
-
-flush(stderr()); flush(stdout())
-
-### Name: state.vbm
-### Title: US State Visibility Based Map
-### Aliases: state.vbm
-### Keywords: datasets
-
-### ** Examples
-
- data(state.vbm)
- plot(state.vbm)
-
- tmp <- state.x77[,'HS Grad']
- tmp2 <- cut(tmp, seq(min(tmp),max(tmp), length.out=11),
- include.lowest=TRUE)
- plot(state.vbm,col=cm.colors(10)[tmp2])
-
-
-
-cleanEx()
-nameEx("sun-methods")
-### * sun-methods
-
-flush(stderr()); flush(stdout())
-
-### Name: sun-methods
-### Title: Methods for sun ephemerides calculations
-### Aliases: crepuscule sunriset solarnoon solarpos crepuscule-methods
-### crepuscule,SpatialPoints,POSIXct-method
-### crepuscule,matrix,POSIXct-method solarnoon-methods
-### solarnoon,SpatialPoints,POSIXct-method
-### solarnoon,matrix,POSIXct-method solarpos-methods
-### solarpos,SpatialPoints,POSIXct-method solarpos,matrix,POSIXct-method
-### sunriset-methods sunriset,SpatialPoints,POSIXct-method
-### sunriset,matrix,POSIXct-method
-### Keywords: methods manip utilities
-
-### ** Examples
-
-## Location of Helsinki, Finland, in decimal degrees,
-## as listed in NOAA's website
-hels <- matrix(c(24.97, 60.17), nrow=1)
-Hels <- SpatialPoints(hels, proj4string=CRS("+proj=longlat +datum=WGS84"))
-d041224 <- as.POSIXct("2004-12-24", tz="EET")
-## Astronomical dawn
-crepuscule(hels, d041224, solarDep=18, direction="dawn", POSIXct.out=TRUE)
-crepuscule(Hels, d041224, solarDep=18, direction="dawn", POSIXct.out=TRUE)
-## Nautical dawn
-crepuscule(hels, d041224, solarDep=12, direction="dawn", POSIXct.out=TRUE)
-crepuscule(Hels, d041224, solarDep=12, direction="dawn", POSIXct.out=TRUE)
-## Civil dawn
-crepuscule(hels, d041224, solarDep=6, direction="dawn", POSIXct.out=TRUE)
-crepuscule(Hels, d041224, solarDep=6, direction="dawn", POSIXct.out=TRUE)
-solarnoon(hels, d041224, POSIXct.out=TRUE)
-solarnoon(Hels, d041224, POSIXct.out=TRUE)
-solarpos(hels, as.POSIXct(Sys.time(), tz="EET"))
-solarpos(Hels, as.POSIXct(Sys.time(), tz="EET"))
-sunriset(hels, d041224, direction="sunrise", POSIXct.out=TRUE)
-sunriset(Hels, d041224, direction="sunrise", POSIXct.out=TRUE)
-## Using a sequence of dates
-Hels_seq <- seq(from=d041224, length.out=365, by="days")
-up <- sunriset(Hels, Hels_seq, direction="sunrise", POSIXct.out=TRUE)
-down <- sunriset(Hels, Hels_seq, direction="sunset", POSIXct.out=TRUE)
-day_length <- down$time - up$time
-plot(Hels_seq, day_length, type="l")
-
-## Using a grid of spatial points for the same point in time
-grd <- GridTopology(c(-179,-89), c(1,1), c(359,179))
-SP <- SpatialPoints(coordinates(grd),
- proj4string=CRS("+proj=longlat +datum=WGS84"))
-wint <- as.POSIXct("2004-12-21", tz="GMT")
-win <- crepuscule(SP, wint, solarDep=6, direction="dawn")
-SPDF <- SpatialGridDataFrame(grd,
- proj4string=CRS("+proj=longlat +datum=WGS84"),
- data=data.frame(winter=win))
-image(SPDF, axes=TRUE, col=cm.colors(40))
-
-
-
-cleanEx()
-nameEx("symbolsInPolys")
-### * symbolsInPolys
-
-flush(stderr()); flush(stdout())
-
-### Name: symbolsInPolys
-### Title: Place grids of points over polygons
-### Aliases: symbolsInPolys
-### Keywords: spatial
-
-### ** Examples
-
-nc_SP <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- proj4string=CRS("+proj=longlat +ellps=clrk66"))
-## Not run:
-##D library(spgpc)
-##D pls <- slot(nc_SP, "polygons")
-##D pls_new <- lapply(pls, checkPolygonsHoles)
-##D nc_SP <- SpatialPolygonsDataFrame(SpatialPolygons(pls_new,
-##D proj4string=CRS(proj4string(nc_SP))), data=as(nc_SP, "data.frame"))
-## End(Not run)
-symbs <- c("-", "+", "x")
-np <- sapply(slot(nc_SP, "polygons"), function(x) length(slot(x, "Polygons")))
-try1 <- symbolsInPolys(nc_SP, 100, symb=symbs[np])
-plot(nc_SP, axes=TRUE)
-plot(try1, add=TRUE, pch=as.character(try1$symb))
-
-
-
-cleanEx()
-nameEx("thinnedSpatialPoly")
-### * thinnedSpatialPoly
-
-flush(stderr()); flush(stdout())
-
-### Name: thinnedSpatialPoly
-### Title: Douglas-Peuker line generalization for Spatial Polygons
-### Aliases: thinnedSpatialPoly
-### Keywords: spatial
-
-### ** Examples
-
-xx <- readShapeSpatial(system.file("shapes/sids.shp", package="maptools")[1],
- IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
-object.size(as(xx, "SpatialPolygons"))
-xxx <- thinnedSpatialPoly(xx, tolerance=0.05, minarea=0.001)
-object.size(as(xxx, "SpatialPolygons"))
-par(mfrow=c(2,1))
-plot(xx)
-plot(xxx)
-par(mfrow=c(1,1))
-
-
-
-graphics::par(get("par.postscript", pos = 'CheckExEnv'))
-cleanEx()
-nameEx("unionSpatialPolygons")
-### * unionSpatialPolygons
-
-flush(stderr()); flush(stdout())
-
-### Name: unionSpatialPolygons
-### Title: Aggregate Polygons in a SpatialPolygons object
-### Aliases: unionSpatialPolygons
-### Keywords: spatial
-
-### ** Examples
-
-if (!rgeosStatus()) gpclibPermit()
-nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
- proj4string=CRS("+proj=longlat +datum=NAD27"))
-lps <- coordinates(nc1)
-ID <- cut(lps[,1], quantile(lps[,1]), include.lowest=TRUE)
-reg4 <- unionSpatialPolygons(nc1, ID)
-row.names(reg4)
-
-
-
-cleanEx()
-nameEx("wrld_simpl")
-### * wrld_simpl
-
-flush(stderr()); flush(stdout())
-
-### Name: wrld_simpl
-### Title: Simplified world country polygons
-### Aliases: wrld_simpl
-### Keywords: datasets
-
-### ** Examples
-
-data(wrld_simpl)
-plot(wrld_simpl)
-
-
-
-### * <FOOTER>
-###
-cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-grDevices::dev.off()
-###
-### Local variables: ***
-### mode: outline-minor ***
-### outline-regexp: "\\(> \\)?### [*]+" ***
-### End: ***
-quit('no')
diff --git a/src/Rcentroid.c b/src/Rcentroid.c
index b0900eb..72e1675 100644
--- a/src/Rcentroid.c
+++ b/src/Rcentroid.c
@@ -213,7 +213,7 @@ void RFindCG( int *n, double *x, double *y, double *xc, double *yc,
tPointd CG;
double Areasum2;
nn = n[0];
- P = (tPointd *) R_alloc(nn, sizeof(tPointd));
+ P = (tPointd *) R_alloc((size_t) nn, sizeof(tPointd));
for (i=0; i<nn; i++) {
P[i][0] = x[i];
P[i][1] = y[i];
diff --git a/src/Rgshhs.c b/src/Rgshhs.c
index ebbc46a..c2c57bd 100644
--- a/src/Rgshhs.c
+++ b/src/Rgshhs.c
@@ -1,4 +1,4 @@
-/* $Id: Rgshhs.c 254 2013-02-09 10:22:26Z rsbivand $
+/* $Id: Rgshhs.c 259 2013-03-30 12:53:40Z rsbivand $
*
* Copyright (c) 1996-2011 by P. Wessel and W. H. F. Smith
* See COPYING file for copying and redistribution conditions.
@@ -153,8 +153,7 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
SET_VECTOR_ELT(res, 13, NEW_INTEGER(npols));
fpos = (signed int) ftell(fp);
- n_read = fread ((void *)&h, (size_t)sizeof (struct GSHHS),
- (size_t)1, fp);
+ n_read = (int) fread ((void *)&h, (size_t)sizeof (struct GSHHS), (size_t)1, fp);
/* version = (h.flag >> 8) & 255;
flip = (version != GSHHS_DATA_VERSION); Take as sign that byte-swabbing is needed */
/* flip = (! (h.level > 0 && h.level < 5));
@@ -180,7 +179,7 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
Level = h.flag & 255;
version = (h.flag >> 8) & 255;
if (!(version >= 9))
- error("Data not same version as software");
+ 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) */
@@ -212,11 +211,10 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
INTEGER_POINTER(VECTOR_ELT(res, 12))[i] = (signed int) h.container;
INTEGER_POINTER(VECTOR_ELT(res, 13))[i] = (signed int) h.ancestor;
- fseek (fp, (long)(h.n * sizeof(struct POINT)), SEEK_CUR);
+ fseek (fp, (long) (h.n * (int) sizeof(struct POINT)), SEEK_CUR);
fpos = (signed int) ftell(fp);
- n_read = fread((void *)&h, (size_t)sizeof (struct GSHHS),
- (size_t)1, fp);
+ n_read = (int) fread((void *)&h, (size_t) sizeof (struct GSHHS), (size_t)1, fp);
i++;
}
@@ -331,7 +329,7 @@ SEXP Rgshhs(SEXP fn, SEXP mode, SEXP dolim, SEXP lim, SEXP level, SEXP minarea)
if (j > 1) max_east = 180000000;
j1 = INTEGER_POINTER(VECTOR_ELT(res, 1))[j];
j2 = INTEGER_POINTER(VECTOR_ELT(res, 5))[j];
- fseek (fp, (long)(sizeof(struct GSHHS) + j2), SEEK_SET);
+ fseek (fp, (long)((int) sizeof(struct GSHHS) + j2), SEEK_SET);
SET_VECTOR_ELT(plist, i, allocMatrix(REALSXP, j1, 2));
for (k = 0; k < j1; k++) {
if (fread ((void *)&p,
@@ -370,7 +368,7 @@ int getNpols(FILE *fp) {
int n_read/*, flip, version*/;
int n;
- n_read = fread ((void *)&h, (size_t)sizeof (struct GSHHS),
+ n_read = (int) fread ((void *)&h, (size_t)sizeof (struct GSHHS),
(size_t)1, fp);
/* version = (h.flag >> 8) & 255;
flip = (version != GSHHS_DATA_VERSION); Take as sign that byte-swabbing is needed */
@@ -382,8 +380,8 @@ int getNpols(FILE *fp) {
/* if (flip) {*/
swapb (&h.n, sizeof(int));
/* }*/
- fseek (fp, (long)(h.n * sizeof(struct POINT)), SEEK_CUR);
- n_read = fread((void *)&h, (size_t)sizeof (struct GSHHS),
+ fseek (fp, (long)(h.n * (int) sizeof(struct POINT)), SEEK_CUR);
+ n_read = (int) fread((void *)&h, (size_t)sizeof (struct GSHHS),
(size_t)1, fp);
n++;
}
diff --git a/src/Rshapewrite1.c b/src/Rshapewrite1.c
index 5c46642..a13e880 100644
--- a/src/Rshapewrite1.c
+++ b/src/Rshapewrite1.c
@@ -36,8 +36,8 @@ SEXP shpwritepolys(SEXP fname, SEXP shapes)
}
nShapes = LENGTH(shapes);
- nParts = (int *) R_alloc((long) nShapes, sizeof(int));
- nVerts = (int *) R_alloc((long) nShapes, sizeof(int));
+ nParts = (int *) R_alloc((size_t) nShapes, sizeof(int));
+ nVerts = (int *) R_alloc((size_t) nShapes, sizeof(int));
PROTECT(SnParts = NEW_CHARACTER(1)); pc++;
SET_STRING_ELT(SnParts, 0, COPY_TO_USER_STRING("nParts"));
PROTECT(Spstart = NEW_CHARACTER(1)); pc++;
@@ -50,15 +50,15 @@ SEXP shpwritepolys(SEXP fname, SEXP shapes)
Spstart), 1))[(nParts[i]-1)] - (nParts[i]-1);
if (nVerts[i] > maxnVerts) maxnVerts = nVerts[i];
}
- panPartStart = (int *) R_alloc((long) maxnParts, sizeof(int));
- from = (int *) R_alloc((long) maxnParts, sizeof(int));
- to = (int *) R_alloc((long) maxnParts, sizeof(int));
+ panPartStart = (int *) R_alloc((size_t) maxnParts, sizeof(int));
+ from = (int *) R_alloc((size_t) maxnParts, sizeof(int));
+ to = (int *) R_alloc((size_t) maxnParts, sizeof(int));
if (maxnVerts > 1000000 || maxnVerts < 1)
error("Old polylist object cannot be exported");
- padfX = (double *) R_alloc((long) maxnVerts, sizeof(double));
- padfY = (double *) R_alloc((long) maxnVerts, sizeof(double));
+ padfX = (double *) R_alloc((size_t) maxnVerts, sizeof(double));
+ padfY = (double *) R_alloc((size_t) maxnVerts, sizeof(double));
if (nShapeType == SHPT_POLYGONZ)
- padfZ = (double *) R_alloc((long) maxnVerts, sizeof(double));
+ padfZ = (double *) R_alloc((size_t) maxnVerts, sizeof(double));
for (i = 0; i < nShapes; i++) {
kk = 0;
@@ -124,8 +124,8 @@ SEXP shpwritelines(SEXP fname, SEXP shapes)
}
nShapes = GET_LENGTH(shapes);
- nParts = (int *) R_alloc((long) nShapes, sizeof(int));
- nVerts = (int *) R_alloc((long) nShapes, sizeof(int));
+ nParts = (int *) R_alloc((size_t) nShapes, sizeof(int));
+ nVerts = (int *) R_alloc((size_t) nShapes, sizeof(int));
PROTECT(SnParts = NEW_CHARACTER(1)); pc++;
SET_STRING_ELT(SnParts, 0, COPY_TO_USER_STRING("nParts"));
PROTECT(Spstart = NEW_CHARACTER(1)); pc++;
@@ -138,17 +138,17 @@ SEXP shpwritelines(SEXP fname, SEXP shapes)
Spstart), 1))[(nParts[i]-1)] - (nParts[i]-1);
if (nVerts[i] > maxnVerts) maxnVerts = nVerts[i];
}
- panPartStart = (int *) R_alloc((long) maxnParts, sizeof(int));
- from = (int *) R_alloc((long) maxnParts, sizeof(int));
- to = (int *) R_alloc((long) maxnParts, sizeof(int));
+ panPartStart = (int *) R_alloc((size_t) maxnParts, sizeof(int));
+ from = (int *) R_alloc((size_t) maxnParts, sizeof(int));
+ to = (int *) R_alloc((size_t) maxnParts, sizeof(int));
/* for (i = 0; i < nShapes; i++) {
nVerts[i] = INTEGER_POINTER(GET_DIM(VECTOR_ELT(shapes, i)))[0];
if (nVerts[i] > maxnVerts) maxnVerts = nVerts[i];
} */
if (maxnVerts < 1)
error("list object cannot be exported");
- padfX = (double *) R_alloc((long) maxnVerts, sizeof(double));
- padfY = (double *) R_alloc((long) maxnVerts, sizeof(double));
+ padfX = (double *) R_alloc((size_t) maxnVerts, sizeof(double));
+ padfY = (double *) R_alloc((size_t) maxnVerts, sizeof(double));
for (i = 0; i < nShapes; i++) {
kk = 0;
diff --git a/src/insiders.c b/src/insiders.c
index ce9d351..a087f9f 100644
--- a/src/insiders.c
+++ b/src/insiders.c
@@ -17,7 +17,7 @@ SEXP mtInsiders(SEXP n1, SEXP bbs) {
n = INTEGER_POINTER(n1)[0];
PROTECT(ans = NEW_LIST(n)); pc++;
- yes = (int *) R_alloc((long) n, sizeof(int));
+ yes = (int *) R_alloc((size_t) n, sizeof(int));
for (i=0; i < n; i++) {
for (j=0; j < n; j++) yes[j] = 0;
bbi[0] = NUMERIC_POINTER(bbs)[i];
diff --git a/src/shapefil.h b/src/shapefil.h
index 3793373..7b24637 100644
--- a/src/shapefil.h
+++ b/src/shapefil.h
@@ -2,7 +2,7 @@
#define _SHAPEFILE_H_INCLUDED
/******************************************************************************
- * $Id: shapefil.h 182 2011-02-06 14:48:28Z rsbivand $
+ * $Id: shapefil.h 259 2013-03-30 12:53:40Z 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/src/shpopen.c b/src/shpopen.c
index 6f0347a..1fe5e76 100644
--- a/src/shpopen.c
+++ b/src/shpopen.c
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: shpopen.c 220 2011-11-14 21:35:15Z rsbivand $
+ * $Id: shpopen.c 259 2013-03-30 12:53:40Z rsbivand $
*
* Project: Shapelib
* Purpose: Implementation of core Shapefile read/write functions.
@@ -200,7 +200,7 @@
#include <string.h>
#include <stdio.h>
-SHP_CVSID("$Id: shpopen.c 220 2011-11-14 21:35:15Z rsbivand $")
+//SHP_CVSID("$Id: shpopen.c 259 2013-03-30 12:53:40Z rsbivand $")
typedef unsigned char uchar;
@@ -251,13 +251,13 @@ static void SwapWord( int length, void * wordP )
/* a valid input. */
/************************************************************************/
-static void * SfRealloc( void * pMem, int nNewSize )
+static void * SfRealloc( void * pMem, size_t nNewSize )
{
if( pMem == NULL )
- return( (void *) malloc(nNewSize) );
+ return( (void *) malloc((size_t) nNewSize) );
else
- return( (void *) realloc(pMem,nNewSize) );
+ return( (void *) realloc(pMem, (size_t) nNewSize) );
}
/************************************************************************/
@@ -345,7 +345,7 @@ void SHPWriteHeader( SHPHandle psSHP )
/* -------------------------------------------------------------------- */
/* Prepare, and write .shx file header. */
/* -------------------------------------------------------------------- */
- i32 = (psSHP->nRecords * 2 * sizeof(int32) + 100)/2; /* file size */
+ i32 = (psSHP->nRecords * 2 * (int) sizeof(int32) + 100)/2; /* file size */
ByteCopy( &i32, abyHeader+24, 4 );
if( !bBigEndian ) SwapWord( 4, abyHeader+24 );
@@ -362,7 +362,7 @@ void SHPWriteHeader( SHPHandle psSHP )
/* -------------------------------------------------------------------- */
/* Write out the .shx contents. */
/* -------------------------------------------------------------------- */
- panSHX = (int32 *) malloc(sizeof(int32) * 2 * psSHP->nRecords);
+ panSHX = (int32 *) malloc(sizeof(int32) * (size_t) (2 * psSHP->nRecords));
for( i = 0; i < psSHP->nRecords; i++ )
{
@@ -372,7 +372,7 @@ void SHPWriteHeader( SHPHandle psSHP )
if( !bBigEndian ) SwapWord( 4, panSHX+i*2+1 );
}
- if( (int)fwrite( panSHX, sizeof(int32)*2, psSHP->nRecords, psSHP->fpSHX )
+ if( (int)fwrite( panSHX, sizeof(int32)*2, (size_t) psSHP->nRecords, psSHP->fpSHX )
!= psSHP->nRecords )
{
#ifdef USE_CPL
@@ -439,9 +439,9 @@ SHPOpen( const char * pszLayer, const char * pszAccess )
/* Compute the base (layer) name. If there is any extension */
/* on the passed in filename we will strip it off. */
/* -------------------------------------------------------------------- */
- pszBasename = (char *) malloc(strlen(pszLayer)+5);
+ pszBasename = (char *) malloc((size_t) (strlen(pszLayer)+5));
strcpy( pszBasename, pszLayer );
- for( i = strlen(pszBasename)-1;
+ for( i = (int) strlen(pszBasename)-1;
i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
&& pszBasename[i] != '\\';
i-- ) {}
@@ -453,7 +453,7 @@ SHPOpen( const char * pszLayer, const char * pszAccess )
/* Open the .shp and .shx files. Note that files pulled from */
/* a PC to Unix with upper case filenames won't work! */
/* -------------------------------------------------------------------- */
- pszFullname = (char *) malloc(strlen(pszBasename) + 5);
+ pszFullname = (char *) malloc((size_t) (strlen(pszBasename) + 5));
sprintf( pszFullname, "%s.shp", pszBasename );
psSHP->fpSHP = fopen(pszFullname, pszAccess );
if( psSHP->fpSHP == NULL )
@@ -503,7 +503,7 @@ SHPOpen( const char * pszLayer, const char * pszAccess )
/* -------------------------------------------------------------------- */
/* Read the file size from the SHP file. */
/* -------------------------------------------------------------------- */
- pabyBuf = (uchar *) malloc(100);
+ pabyBuf = (uchar *) malloc((size_t) (100));
fread( pabyBuf, 100, 1, psSHP->fpSHP );
psSHP->nFileSize = (pabyBuf[24] * 256 * 256 * 256
@@ -596,12 +596,12 @@ SHPOpen( const char * pszLayer, const char * pszAccess )
psSHP->nMaxRecords = psSHP->nRecords;
psSHP->panRecOffset =
- (int *) malloc(sizeof(int) * MAX(1,psSHP->nMaxRecords) );
+ (int *) malloc(sizeof(int) * (size_t) (MAX(1,psSHP->nMaxRecords)) );
psSHP->panRecSize =
- (int *) malloc(sizeof(int) * MAX(1,psSHP->nMaxRecords) );
+ (int *) malloc(sizeof(int) * (size_t) (MAX(1,psSHP->nMaxRecords)) );
- pabyBuf = (uchar *) malloc(8 * MAX(1,psSHP->nRecords) );
- if( (int) fread( pabyBuf, 8, psSHP->nRecords, psSHP->fpSHX )
+ pabyBuf = (uchar *) malloc(8 * (size_t) (MAX(1,psSHP->nRecords)) );
+ if( (int) fread( pabyBuf, 8, (size_t) psSHP->nRecords, psSHP->fpSHX )
!= psSHP->nRecords )
{
#ifdef USE_CPL
@@ -735,9 +735,9 @@ SHPCreate( const char * pszLayer, int nShapeType )
/* Compute the base (layer) name. If there is any extension */
/* on the passed in filename we will strip it off. */
/* -------------------------------------------------------------------- */
- pszBasename = (char *) malloc(strlen(pszLayer)+5);
+ pszBasename = (char *) malloc((size_t) (strlen(pszLayer)+5));
strcpy( pszBasename, pszLayer );
- for( i = strlen(pszBasename)-1;
+ for( i = (int) strlen(pszBasename)-1;
i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
&& pszBasename[i] != '\\';
i-- ) {}
@@ -748,7 +748,7 @@ SHPCreate( const char * pszLayer, int nShapeType )
/* -------------------------------------------------------------------- */
/* Open the two files so we can write their headers. */
/* -------------------------------------------------------------------- */
- pszFullname = (char *) malloc(strlen(pszBasename) + 5);
+ pszFullname = (char *) malloc((size_t) (strlen(pszBasename) + 5));
sprintf( pszFullname, "%s.shp", pszBasename );
fpSHP = fopen(pszFullname, "wb" );
if( fpSHP == NULL )
@@ -961,9 +961,9 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
psObject->nParts = MAX(1,nParts);
psObject->panPartStart = (int *)
- malloc(sizeof(int) * psObject->nParts);
+ malloc(sizeof(int) * (size_t) psObject->nParts);
psObject->panPartType = (int *)
- malloc(sizeof(int) * psObject->nParts);
+ malloc(sizeof(int) * (size_t) psObject->nParts);
psObject->panPartStart[0] = 0;
psObject->panPartType[0] = SHPP_RING;
@@ -997,10 +997,10 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
/* -------------------------------------------------------------------- */
if( nVertices > 0 )
{
- psObject->padfX = (double *) calloc(sizeof(double),nVertices);
- psObject->padfY = (double *) calloc(sizeof(double),nVertices);
- psObject->padfZ = (double *) calloc(sizeof(double),nVertices);
- psObject->padfM = (double *) calloc(sizeof(double),nVertices);
+ psObject->padfX = (double *) calloc(sizeof(double), (size_t) nVertices);
+ psObject->padfY = (double *) calloc(sizeof(double), (size_t) nVertices);
+ psObject->padfZ = (double *) calloc(sizeof(double), (size_t) nVertices);
+ psObject->padfM = (double *) calloc(sizeof(double), (size_t) nVertices);
/* RSB 071110 */
if ( !(padfX != NULL) ) error("assert( padfX != NULL ) failed");
@@ -1088,16 +1088,16 @@ SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject * psObject )
psSHP->nMaxRecords =(int) ( psSHP->nMaxRecords * 1.3 + 100);
psSHP->panRecOffset = (int *)
- SfRealloc(psSHP->panRecOffset,sizeof(int) * psSHP->nMaxRecords );
+ SfRealloc(psSHP->panRecOffset, sizeof(int) * (size_t) psSHP->nMaxRecords );
psSHP->panRecSize = (int *)
- SfRealloc(psSHP->panRecSize,sizeof(int) * psSHP->nMaxRecords );
+ SfRealloc(psSHP->panRecSize, sizeof(int) * (size_t) psSHP->nMaxRecords );
}
/* -------------------------------------------------------------------- */
/* Initialize record. */
/* -------------------------------------------------------------------- */
- pabyRec = (uchar *) malloc(psObject->nVertices * 4 * sizeof(double)
- + psObject->nParts * 8 + 128);
+ pabyRec = (uchar *) malloc((size_t) (psObject->nVertices * 4 * (int) sizeof(double)
+ + psObject->nParts * 8 + 128));
/* -------------------------------------------------------------------- */
/* Extract vertices for a Polygon or Arc. */
@@ -1130,7 +1130,7 @@ SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject * psObject )
* Write part start positions.
*/
ByteCopy( psObject->panPartStart, pabyRec + 44 + 8,
- 4 * psObject->nParts );
+ (size_t) (4 * psObject->nParts) );
for( i = 0; i < psObject->nParts; i++ )
{
if( bBigEndian ) SwapWord( 4, pabyRec + 44 + 8 + 4*i );
@@ -1143,7 +1143,7 @@ SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject * psObject )
if( psObject->nSHPType == SHPT_MULTIPATCH )
{
memcpy( pabyRec + nRecordSize, psObject->panPartType,
- 4*psObject->nParts );
+ (size_t) (4*psObject->nParts) );
for( i = 0; i < psObject->nParts; i++ )
{
if( bBigEndian ) SwapWord( 4, pabyRec + nRecordSize );
@@ -1368,8 +1368,8 @@ SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject * psObject )
/* -------------------------------------------------------------------- */
/* Write out record. */
/* -------------------------------------------------------------------- */
- if( fseek( psSHP->fpSHP, nRecordOffset, 0 ) != 0
- || fwrite( pabyRec, nRecordSize, 1, psSHP->fpSHP ) < 1 )
+ if( fseek( psSHP->fpSHP, (long) nRecordOffset, 0 ) != 0
+ || fwrite( pabyRec, (size_t) nRecordSize, 1, psSHP->fpSHP ) < 1 )
{
#ifdef USE_CPL
CPLError( CE_Failure, CPLE_FileIO,
@@ -1445,14 +1445,14 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
if( psSHP->panRecSize[hEntity]+8 > psSHP->nBufSize )
{
psSHP->nBufSize = psSHP->panRecSize[hEntity]+8;
- psSHP->pabyRec = (uchar *) SfRealloc(psSHP->pabyRec,psSHP->nBufSize);
+ psSHP->pabyRec = (uchar *) SfRealloc(psSHP->pabyRec, (size_t) psSHP->nBufSize);
}
/* -------------------------------------------------------------------- */
/* Read the record. */
/* -------------------------------------------------------------------- */
if( fseek( psSHP->fpSHP, psSHP->panRecOffset[hEntity], 0 ) != 0
- || fread( psSHP->pabyRec, psSHP->panRecSize[hEntity]+8, 1,
+ || fread( psSHP->pabyRec, (size_t) psSHP->panRecSize[hEntity]+8, 1,
psSHP->fpSHP ) != 1 )
{
#ifdef USE_CPL
@@ -1508,14 +1508,14 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
if( bBigEndian ) SwapWord( 4, &nParts );
psShape->nVertices = nPoints;
- psShape->padfX = (double *) calloc(nPoints,sizeof(double));
- psShape->padfY = (double *) calloc(nPoints,sizeof(double));
- psShape->padfZ = (double *) calloc(nPoints,sizeof(double));
- psShape->padfM = (double *) calloc(nPoints,sizeof(double));
+ psShape->padfX = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfY = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfZ = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfM = (double *) calloc((size_t) nPoints,sizeof(double));
psShape->nParts = nParts;
- psShape->panPartStart = (int *) calloc(nParts,sizeof(int));
- psShape->panPartType = (int *) calloc(nParts,sizeof(int));
+ psShape->panPartStart = (int *) calloc((size_t) nParts,sizeof(int));
+ psShape->panPartType = (int *) calloc((size_t) nParts,sizeof(int));
for( i = 0; i < nParts; i++ )
psShape->panPartType[i] = SHPP_RING;
@@ -1523,7 +1523,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
/* -------------------------------------------------------------------- */
/* Copy out the part array from the record. */
/* -------------------------------------------------------------------- */
- memcpy( psShape->panPartStart, psSHP->pabyRec + 44 + 8, 4 * nParts );
+ memcpy( psShape->panPartStart, psSHP->pabyRec + 44 + 8, (size_t) (4 * nParts) );
for( i = 0; i < nParts; i++ )
{
if( bBigEndian ) SwapWord( 4, psShape->panPartStart+i );
@@ -1536,7 +1536,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
/* -------------------------------------------------------------------- */
if( psShape->nSHPType == SHPT_MULTIPATCH )
{
- memcpy( psShape->panPartType, psSHP->pabyRec + nOffset, 4*nParts );
+ memcpy( psShape->panPartType, psSHP->pabyRec + nOffset, (size_t) (4*nParts) );
for( i = 0; i < nParts; i++ )
{
if( bBigEndian ) SwapWord( 4, psShape->panPartType+i );
@@ -1625,10 +1625,10 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
if( bBigEndian ) SwapWord( 4, &nPoints );
psShape->nVertices = nPoints;
- psShape->padfX = (double *) calloc(nPoints,sizeof(double));
- psShape->padfY = (double *) calloc(nPoints,sizeof(double));
- psShape->padfZ = (double *) calloc(nPoints,sizeof(double));
- psShape->padfM = (double *) calloc(nPoints,sizeof(double));
+ psShape->padfX = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfY = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfZ = (double *) calloc((size_t) nPoints,sizeof(double));
+ psShape->padfM = (double *) calloc((size_t) nPoints,sizeof(double));
for( i = 0; i < nPoints; i++ )
{
diff --git a/src/shptree.c b/src/shptree.c
index 94f7c9b..64ee2e3 100644
--- a/src/shptree.c
+++ b/src/shptree.c
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: shptree.c 182 2011-02-06 14:48:28Z rsbivand $
+ * $Id: shptree.c 259 2013-03-30 12:53:40Z rsbivand $
*
* Project: Shapelib
* Purpose: Implementation of quadtree building and searching functions.
@@ -79,7 +79,7 @@
#include <stdlib.h>
#include <string.h>
-SHP_CVSID("$Id: shptree.c 182 2011-02-06 14:48:28Z rsbivand $")
+//SHP_CVSID("$Id: shptree.c 259 2013-03-30 12:53:40Z rsbivand $")
#ifndef TRUE
# define TRUE 1
@@ -106,13 +106,13 @@ static int bBigEndian = 0;
/* a valid input. */
/************************************************************************/
-static void * SfRealloc( void * pMem, int nNewSize )
+static void * SfRealloc( void * pMem, size_t nNewSize )
{
if( pMem == NULL )
- return( (void *) malloc(nNewSize) );
+ return( (void *) malloc((size_t) nNewSize) );
else
- return( (void *) realloc(pMem,nNewSize) );
+ return( (void *) realloc(pMem, (size_t) nNewSize) );
}
/************************************************************************/
@@ -507,14 +507,14 @@ SHPTreeNodeAddShapeId( SHPTreeNode * psTreeNode, SHPObject * psObject,
psTreeNode->panShapeIds = (int *)
SfRealloc( psTreeNode->panShapeIds,
- sizeof(int) * psTreeNode->nShapeCount );
+ sizeof(int) * (size_t) psTreeNode->nShapeCount );
psTreeNode->panShapeIds[psTreeNode->nShapeCount-1] = psObject->nShapeId;
if( psTreeNode->papsShapeObj != NULL )
{
psTreeNode->papsShapeObj = (SHPObject **)
SfRealloc( psTreeNode->papsShapeObj,
- sizeof(void *) * psTreeNode->nShapeCount );
+ sizeof(void *) * (size_t) psTreeNode->nShapeCount );
psTreeNode->papsShapeObj[psTreeNode->nShapeCount-1] = NULL;
}
@@ -572,7 +572,7 @@ SHPTreeCollectShapeIds( SHPTree *hTree, SHPTreeNode * psTreeNode,
{
*pnMaxShapes = (*pnShapeCount + psTreeNode->nShapeCount) * 2 + 20;
*ppanShapeList = (int *)
- SfRealloc(*ppanShapeList,sizeof(int) * *pnMaxShapes);
+ SfRealloc(*ppanShapeList,sizeof(int) * (size_t) *pnMaxShapes);
}
/* -------------------------------------------------------------------- */
@@ -635,7 +635,7 @@ SHPTreeFindLikelyShapes( SHPTree * hTree,
/* Sort the id array */
/* -------------------------------------------------------------------- */
- qsort(panShapeList, *pnShapeCount, sizeof(int), compare_ints);
+ qsort(panShapeList, (size_t) *pnShapeCount, sizeof(int), compare_ints);
return panShapeList;
}
@@ -721,7 +721,7 @@ SHPSearchDiskTreeNode( FILE *fp, double *padfBoundsMin, double *padfBoundsMax,
{
int i;
- int offset;
+ size_t offset;
int numshapes, numsubnodes;
double adfNodeBoundsMin[2], adfNodeBoundsMax[2];
@@ -751,8 +751,8 @@ SHPSearchDiskTreeNode( FILE *fp, double *padfBoundsMin, double *padfBoundsMax,
if( !SHPCheckBoundsOverlap( adfNodeBoundsMin, adfNodeBoundsMax,
padfBoundsMin, padfBoundsMax, 2 ) )
{
- offset += numshapes*sizeof(int) + sizeof(int);
- fseek(fp, offset, SEEK_CUR);
+ offset += (size_t) numshapes*sizeof(int) + sizeof(int);
+ fseek(fp, (long) offset, SEEK_CUR);
return TRUE;
}
@@ -765,11 +765,11 @@ SHPSearchDiskTreeNode( FILE *fp, double *padfBoundsMin, double *padfBoundsMax,
{
*pnBufferMax = (int) ((*pnResultCount + numshapes + 100) * 1.25);
*ppanResultBuffer = (int *)
- SfRealloc( *ppanResultBuffer, *pnBufferMax * sizeof(int) );
+ SfRealloc( *ppanResultBuffer, (size_t) *pnBufferMax * sizeof(int) );
}
fread( *ppanResultBuffer + *pnResultCount,
- sizeof(int), numshapes, fp );
+ sizeof(int), (size_t) numshapes, fp );
if (bNeedSwap )
{
@@ -852,7 +852,7 @@ SHPSearchDiskTree( FILE *fp,
/* -------------------------------------------------------------------- */
/* Sort the id array */
/* -------------------------------------------------------------------- */
- qsort(panResultBuffer, *pnShapeCount, sizeof(int), compare_ints);
+ qsort(panResultBuffer, (size_t) *pnShapeCount, sizeof(int), compare_ints);
return panResultBuffer;
}
@@ -868,19 +868,19 @@ SHPSearchDiskTree( FILE *fp,
static int SHPGetSubNodeOffset( SHPTreeNode *node)
{
int i;
- long offset=0;
+ size_t offset=0;
for(i=0; i<node->nSubNodes; i++ )
{
if(node->apsSubNode[i])
{
offset += 4*sizeof(double)
- + (node->apsSubNode[i]->nShapeCount+3)*sizeof(int);
- offset += SHPGetSubNodeOffset(node->apsSubNode[i]);
+ + (size_t) (node->apsSubNode[i]->nShapeCount+3)*sizeof(int);
+ offset += (size_t) SHPGetSubNodeOffset(node->apsSubNode[i]);
}
}
- return(offset);
+ return((int) offset);
}
/************************************************************************/
@@ -897,7 +897,7 @@ static void SHPWriteTreeNode( FILE *fp, SHPTreeNode *node)
pabyRec = (unsigned char *)
malloc(sizeof(double) * 4
- + (3 * sizeof(int)) + (node->nShapeCount * sizeof(int)) );
+ + (3 * sizeof(int)) + ((size_t) node->nShapeCount * sizeof(int)) );
memcpy( pabyRec, &offset, 4);
@@ -908,11 +908,11 @@ static void SHPWriteTreeNode( FILE *fp, SHPTreeNode *node)
memcpy( pabyRec+28, node->adfBoundsMax+1, sizeof(double) );
memcpy( pabyRec+36, &node->nShapeCount, 4);
- j = node->nShapeCount * sizeof(int);
- memcpy( pabyRec+40, node->panShapeIds, j);
+ j = node->nShapeCount * (int) sizeof(int);
+ memcpy( pabyRec+40, node->panShapeIds, (size_t) j);
memcpy( pabyRec+j+40, &node->nSubNodes, 4);
- fwrite( pabyRec, 44+j, 1, fp );
+ fwrite( pabyRec, (size_t) (44+j), 1, fp );
free (pabyRec);
for(i=0; i<node->nSubNodes; i++ )
diff --git a/vignettes/combine_maptools.Rnw b/vignettes/combine_maptools.Rnw
new file mode 100644
index 0000000..a4ac4b1
--- /dev/null
+++ b/vignettes/combine_maptools.Rnw
@@ -0,0 +1,431 @@
+%\VignetteIndexEntry{Combining Spatial Data}
+%\VignetteDepends{}
+%\VignetteKeywords{spatial}
+%\VignettePackage{maptools}
+\documentclass[a4paper,10pt]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage[dvips]{graphicx,color}
+\usepackage{times}
+\usepackage{hyperref}
+\usepackage{natbib}
+\usepackage[english]{babel}
+\usepackage{xspace}
+
+\usepackage{Sweave}
+\usepackage{mathptm}
+\usepackage{natbib}
+
+\setkeys{Gin}{width=0.95\textwidth}
+\newcommand{\strong}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\let\pkg=\strong
+\RequirePackage{alltt}
+\newenvironment{example}{\begin{alltt}}{\end{alltt}}
+\newenvironment{smallexample}{\begin{alltt}\small}{\end{alltt}}
+\newcommand{\code}[1]{\texttt{\small #1}}
+\def\RR{\textsf{R}\xspace}
+\def\SP{\texttt{S-PLUS}\xspace}
+\def\SS{\texttt{S}\xspace}
+%#Sweave("combine_maptools.Rnw", keep.source=FALSE)
+\SweaveOpts{keep.source=FALSE}
+
+
+\title{Combining Spatial Data\footnote{This vignette formed pp. 120--126 of the first edition of Bivand, R. S.,
+Pebesma, E. and Gómez-Rubio V. (2008) Applied Spatial Data Analysis with R,
+Springer-Verlag, New York. It was retired from the second edition (2013) to
+accommodate material on other topics, and is made available in this form
+with the understanding of the publishers.}}
+\author{Roger Bivand}
+
+\begin{document}
+
+\maketitle
+
+<<echo=FALSE>>=
+owidth <- getOption("width")
+options("width"=90)
+.PngNo <- 0
+@
+
+<<label=afig,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+@
+<<label=afigl,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 3.5, pointsize = 12, bg = "white")
+@
+<<label=bfigl,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+@
+<<label=bfig,echo=FALSE,eval=FALSE>>=
+.PngNo <- .PngNo + 1; file <- paste("Fig-bitmap-", .PngNo, ".pdf", sep="")
+pdf(file=file, width = 6.5, height = 5, pointsize = 12, bg = "white")
+opar <- par(mar=c(3,3,1,1)+0.1)
+@
+
+<<label=zfig,echo=FALSE,eval=FALSE>>=
+par(opar)
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+@
+<<label=zfigl,echo=FALSE,eval=FALSE>>=
+dev.null <- dev.off()
+cat("\\includegraphics[width=0.95\\textwidth]{", file, "}\n\n", sep="")
+@
+
+\section{Introduction}
+
+%FIXME
+
+\section{Checking Topologies}
+
+In this vignette, we look at a practical example
+involving the cleaning of spatial objects originally read into \RR from
+shapefiles published by the US Census. We then aggregate them up
+to metropolitan areas using a text table also from the US Census.
+
+The data in this case are for polygons representing county
+boundaries in 1990 of North Carolina, South Carolina, and
+Virginia, as shown in Fig.\,\ref{fig:poly3a}. The attribute data
+for each polygon are the standard polygon identifiers, state and
+county identifiers, and county names. All the spatial objects
+have the same number of columns of attribute data of the same
+types and with the same names. The files are provided without
+coordinate reference systems as shapefiles; the metadata are used
+for choosing the \code{CRS} values.
+
+\begin{footnotesize}
+<<echo=TRUE,eval=TRUE,keep.source=FALSE>>=
+owd <- getwd()
+setwd(system.file("shapes", package="maptools"))
+library(maptools)
+nc90 <- readShapeSpatial("co37_d90")
+proj4string(nc90) <- CRS("+proj=longlat +datum=NAD27")
+sc90 <- readShapeSpatial("co45_d90")
+proj4string(sc90) <- CRS("+proj=longlat +datum=NAD27")
+va90 <- readShapeSpatial("co51_d90")
+proj4string(va90) <- CRS("+proj=longlat +datum=NAD27")
+setwd(owd)
+@
+\end{footnotesize}
+
+\begin{figure}[htb]
+\centering
+<<echo=FALSE,results=tex>>=
+<<bfig>>
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(va90, xlim=c(-85,-75), ylim=c(32,40), axes=TRUE, border="grey10")
+plot(nc90, add=TRUE, border="grey40")
+plot(sc90, add=TRUE, border="grey70")
+par(oopar)
+<<zfig>>
+@
+\caption{The
+three states plotted from input spatial objects using different
+grey colours for county boundaries}
+\label{fig:poly3a}
+\end{figure}
+
+\noindent
+As read in, shapefiles usually have the polygon IDs set to the external
+file feature sequence number from zero to one less than the number
+of features. In our case, wanting to combine three states, we
+need to change the ID values so that they are unique across the study
+area. We can use the FIPS code (Federal Information Processing Standards
+Publication 6-4), which is simply the two-digit state FIPS code placed in
+front of the three-digit within-state FIPS county code, ending up with
+a five-digit string uniquely identifying each county. We can also drop
+the first four attribute data columns, two of which (area and perimeter)
+are misleading for objects in geographical coordinates, and the other two
+are internal ID values from the software used to generate the shapefiles,
+replicating the original feature IDs. We can start with the data set of
+South Carolina (\code{sc90}):
+
+\begin{footnotesize}
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+library(maptools)
+@
+<<echo=TRUE,keep.source=FALSE>>=
+names(sc90)
+sc90a <- spChFIDs(sc90, paste(sc90$ST, sc90$CO, sep=""))
+sc90a <- sc90a[,-(1:4)]
+names(sc90a)
+@
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+proj4string(sc90a) <- CRS(proj4string(sc90a))
+@
+\end{footnotesize}
+
+
+\subsection{Dissolving Polygons}
+
+When we try the same sequence of commands for North Carolina, we run
+into difficulties:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+names(nc90)
+@
+<<echo=TRUE,eval=FALSE,keep.source=FALSE>>=
+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="")))
+@
+<<eval=TRUE,echo=FALSE>>=
+cat(try1)
+@
+\end{footnotesize}
+
+\noindent
+Tabulating the frequencies of polygons per unique county ID, we can see
+that 98 of North Carolina's counties are represented by single polygons,
+while one has two polygons, and one (on the coast) has four.
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+table(table(paste(nc90$ST, nc90$CO, sep="")))
+@
+\end{footnotesize}
+
+\noindent
+One reason for spatial data being structured in this way is that it
+is following the OpenGIS$^{\mbox{\scriptsize\textregistered}}$\footnote{See \url{http://www.opengeospatial.org/}.}
+Simple Features Specification,
+\label{OpenGIS_SFS}
+which allows polygons to have one and only one external boundary
+ring, and an unlimited number of internal boundaries -- holes.
+This means that multiple external boundaries -- such as a county
+made up of several islands -- are represented as multiple
+polygons. In the specification, they are linked to attribute data
+through a look-up table pointing to the appropriate attribute
+data row.
+
+We need to restructure the \code{SpatialPolygons} object such that the
+\code{Polygon} objects belonging to each county belong to the same
+\code{Polygons} object. To do this, we use a function\footnote{This
+function requires that the \pkg{rgeos} package is also installed.} in
+the \pkg{maptools} package also used for dissolving or merging polygons,
+but which can be used here to re-package the original features, so that
+each \code{Polygons} object corresponds to one and only one county:
+
+\begin{footnotesize}
+<<echo=TRUE,results=hide,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc90a <- unionSpatialPolygons(nc90, IDs=paste(nc90$ST, nc90$CO, sep=""))
+}
+@
+\end{footnotesize}
+
+\noindent The function uses the IDs argument to set the ID slots
+of the output \code{SpatialPolygons} object. Having sorted out
+the polygons, we need to remove the duplicate rows from the data
+frame and put the pieces back together again:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc90_df <- as(nc90, "data.frame")[!duplicated(nc90$CO),-(1:4)]
+row.names(nc90_df) <- paste(nc90_df$ST, nc90_df$CO, sep="")
+nc90b <- SpatialPolygonsDataFrame(nc90a, nc90_df)
+}
+@
+\end{footnotesize}
+
+\subsection{Checking Hole Status}
+
+Looking again at Fig.\,\ref{fig:poly3a}, we can see that while
+neither North Carolina nor South Carolina has included boroughs
+within counties, these are frequently found in Virginia. While
+data read from external sources are expected to be structured
+correctly, with the including polygon having an outer edge and an
+inner hole, into which the outer edge of the included borough
+fits, we can also
+check and correct the settings of the hole slot in \code{Polygon}
+objects. The \code{checkPolygonsHoles} function takes a
+\code{Polygons} object as its argument, and, if multiple
+\code{Polygon} objects belong to it, checks them for hole status
+using functions from the \pkg{rgeos} package:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+va90a <- spChFIDs(va90, paste(va90$ST, va90$CO, sep=""))
+va90a <- va90a[,-(1:4)]
+va90_pl <- slot(va90a, "polygons")
+va90_pla <- lapply(va90_pl, checkPolygonsHoles)
+p4sva <- CRS(proj4string(va90a))
+vaSP <- SpatialPolygons(va90_pla, proj4string=p4sva)
+va90b <- SpatialPolygonsDataFrame(vaSP, data=as(va90a, "data.frame"))
+}
+@
+\end{footnotesize}
+
+\noindent
+Here we have changed the \code{Polygons} ID values as before, and then
+processed each \code{Polygons} object in turn for internal consistency, finally
+re-assembling the cleaned object. So we now have three spatial objects
+with mutually unique IDs, and with data slots containing data frames
+with the same numbers and kinds of columns with the same names.
+
+
+\section{Combining Spatial Data}
+
+It is quite often desirable to combine spatial data of the same kind,
+in addition to combining positional data of different kinds as discussed
+earlier in this chapter. There are functions \code{rbind} and \code{cbind}
+in \RR for combining objects by rows or columns, and \code{rbind} methods
+for \code{SpatialPixels} and \code{SpatialPixelsDataFrame} objects, as
+well as a \code{cbind} method for \code{SpatialGridDataFrame} objects
+are included in \pkg{sp}. In addition, methods with slightly different
+names to carry out similar operations are included in the \pkg{maptools}
+package.
+
+\subsection{Combining Positional Data}
+
+The \code{spRbind} method combines positional data, such as two
+\code{SpatialPoints} objects or two \code{SpatialPointsDataFrame}
+objects with matching column names and types in their data slots.
+The method is also implemented for \code{SpatialLines} and
+\code{SpatialPolygons} objects and their \code{*DataFrame}
+extensions. The methods do not check for duplication or
+overlapping of the spatial objects being combined, but do reject
+attempts to combine objects that would have resulted in
+non-unique IDs.
+
+Because the methods only take two arguments, combining more than two
+involves repeating calls to the method:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+nc_sc_va90 <- spRbind(spRbind(nc90b, sc90a), va90b)
+FIPS <- row.names(nc_sc_va90)
+str(FIPS)
+length(slot(nc_sc_va90, "polygons"))
+}
+@
+\end{footnotesize}
+
+\subsection{Combining Attribute Data}
+\label{spCbind:here}
+
+Here, as very often found in practice, we need to combine data
+for the same spatial objects from different sources, where one
+data source includes the geometries and an identifying index
+variable, and other data sources include the same index variable
+with additional variables. They often include more observations
+than our geometries, sometimes have no data for some of our
+geometries, and not are infrequently sorted in a different
+order. The data cleaning involved in getting ready for analysis
+is a little more tedious with spatial data, as we see, but
+does not differ in principle from steps taken with non-spatial
+data.
+
+The text file provided by the US Census tabulating which counties
+belonged to each metropolitan area in 1990 has a header, which
+has already been omitted, a footer with formatting information,
+and many blank columns. We remove the footer and the blank
+columns first, and go on to remove rows with no data -- the
+metropolitan areas are separated in the file by empty lines. The
+required rows and column numbers were found by inspecting the
+file before reading it into \RR:
+
+\begin{footnotesize}
+<<echo=TRUE,eval=TRUE,keep.source=FALSE>>=
+t1 <- read.fwf(system.file("share/90mfips.txt", package="maptools"), skip=21,
+ widths=c(4,4,4,4,2,6,2,3,3,1,7,5,3,51), colClasses = "character")
+@
+<<echo=TRUE,keep.source=FALSE>>=
+t2 <- t1[1:2004,c(1,7,8,14)]
+t3 <- t2[complete.cases(t2),]
+cnty1 <- t3[t3$V7 != " ",]
+ma1 <- t3[t3$V7 == " ",c(1,4)]
+cnty2 <- cnty1[which(!is.na(match(cnty1$V7, c("37", "45", "51")))),]
+cnty2$FIPS <- paste(cnty2$V7, cnty2$V8, sep="")
+@
+\end{footnotesize}
+
+\noindent We next break out an object with metro IDs, state and
+county IDs, and county names (\code{cnty1}), and an object with
+metro IDs and metro names (\code{ma1}). From there, we subset the
+counties to the three states, and add the FIPS string for each
+county, to make it possible to combine the new data concerning
+metro area membership to our combined county map. We create an
+object (\code{MA\_FIPS}) of county metro IDs by matching the
+\code{cnty2} FIPS IDs with those of the counties on the map, and
+then retrieving the metro area names from \code{ma1}. These two
+variables are then made into a data frame, the appropriate row
+names inserted and combined with the county map, with method
+\code{spCbind}. At last we are ready to dissolve the counties
+belonging to metro areas and to discard those not belonging to
+metro areas, using \code{unionSpatialPolygons}:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+MA_FIPS <- cnty2$V1[match(FIPS, cnty2$FIPS)]
+MA <- ma1$V14[match(MA_FIPS, ma1$V1)]
+MA_df <- data.frame(MA_FIPS=MA_FIPS, MA=MA, row.names=FIPS)
+nc_sc_va90a <- spCbind(nc_sc_va90, MA_df)
+ncscva_MA <- unionSpatialPolygons(nc_sc_va90a, nc_sc_va90a$MA_FIPS)
+}
+@
+\end{footnotesize}
+
+\begin{figure}[htb]
+\centering
+<<echo=FALSE,results=tex>>=
+<<bfig>>
+if (rgeosStatus()) {
+oopar <- par(mar=c(3,2,1,1)+0.1)
+plot(nc_sc_va90, border="grey", axes=TRUE)
+plot(ncscva_MA, lwd=2, add=TRUE)
+text(coordinates(ncscva_MA), labels=row.names(ncscva_MA), cex=0.6)
+par(oopar)
+} else {
+plot(1)
+}
+<<zfig>>
+@
+\caption{The
+three states with county boundaries plotted in grey, and
+Metropolitan area boundaries plotted in black; Metro area
+standard IDs are shown}
+\label{fig:poly3b}
+\end{figure}
+
+Figure~\ref{fig:poly3b} shows the output object plotted on top of
+the cleaned input county boundaries. There does appear to be a
+problem, however, because one of the output boundaries has no
+name -- it is located between 6760 and 5720 in eastern Virginia.
+If we do some more matching, to extract the names of the
+metropolitan areas, we can display the name of the area with
+multiple polygons:
+
+\begin{footnotesize}
+<<echo=TRUE,keep.source=FALSE>>=
+if (rgeosStatus()) {
+np <- sapply(slot(ncscva_MA, "polygons"), function(x) length(slot(x, "Polygons")))
+table(np)
+MA_fips <- row.names(ncscva_MA)
+MA_name <- ma1$V14[match(MA_fips, ma1$V1)]
+data.frame(MA_fips, MA_name)[np > 1,]
+}
+@
+\end{footnotesize}
+
+The Norfolk-Virginia Beach-Newport News, VA MSA is located on both sides
+of Hampton Roads, and the label has been positioned at the centre point
+of the largest member polygon.
+
+<<echo=FALSE>>=
+options("width"=owidth)
+@
+
+
+\end{document}
+
--
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