...
 
Commits (6)
debian/.debhelper/
debian/debhelper-build-stamp
debian/files
debian/r-cran-sp.substvars
debian/r-cran-sp/
Package: sp Package: sp
Version: 1.2-5 Version: 1.2-7
Title: Classes and Methods for Spatial Data Title: Classes and Methods for Spatial Data
Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"), Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"),
email = "edzer.pebesma@uni-muenster.de"), email = "edzer.pebesma@uni-muenster.de"),
...@@ -11,7 +11,8 @@ Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"), ...@@ -11,7 +11,8 @@ Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"),
person("Michael", "Sumner", role = "ctb"), person("Michael", "Sumner", role = "ctb"),
person("Don", "MacQueen", role = "ctb"), person("Don", "MacQueen", role = "ctb"),
person("Jim", "Lemon", role = "ctb"), person("Jim", "Lemon", role = "ctb"),
person("Josh", "O'Brien", role = "ctb")) person("Josh", "O'Brien", role = "ctb"),
person("Joseph", "O'Rourke", role = "ctb"))
Depends: R (>= 3.0.0), methods Depends: R (>= 3.0.0), methods
Imports: utils, stats, graphics, grDevices, lattice, grid Imports: utils, stats, graphics, grDevices, lattice, grid
Suggests: RColorBrewer, rgdal (>= 0.8-7), rgeos (>= 0.3-13), gstat, Suggests: RColorBrewer, rgdal (>= 0.8-7), rgeos (>= 0.3-13), gstat,
...@@ -45,7 +46,7 @@ Collate: bpy.colors.R AAA.R Class-CRS.R CRS-methods.R Class-Spatial.R ...@@ -45,7 +46,7 @@ Collate: bpy.colors.R AAA.R Class-CRS.R CRS-methods.R Class-Spatial.R
compassRose.R surfaceArea.R spOptions.R subset.R disaggregate.R compassRose.R surfaceArea.R spOptions.R subset.R disaggregate.R
sp_spat1.R merge.R aggregate.R sp_spat1.R merge.R aggregate.R
NeedsCompilation: yes NeedsCompilation: yes
Packaged: 2017-06-27 12:59:17 UTC; edzer Packaged: 2018-01-18 20:46:27 UTC; edzer
Author: Edzer Pebesma [aut, cre], Author: Edzer Pebesma [aut, cre],
Roger Bivand [aut], Roger Bivand [aut],
Barry Rowlingson [ctb], Barry Rowlingson [ctb],
...@@ -54,7 +55,8 @@ Author: Edzer Pebesma [aut, cre], ...@@ -54,7 +55,8 @@ Author: Edzer Pebesma [aut, cre],
Michael Sumner [ctb], Michael Sumner [ctb],
Don MacQueen [ctb], Don MacQueen [ctb],
Jim Lemon [ctb], Jim Lemon [ctb],
Josh O'Brien [ctb] Josh O'Brien [ctb],
Joseph O'Rourke [ctb]
Maintainer: Edzer Pebesma <edzer.pebesma@uni-muenster.de> Maintainer: Edzer Pebesma <edzer.pebesma@uni-muenster.de>
Repository: CRAN Repository: CRAN
Date/Publication: 2017-06-29 09:07:36 UTC Date/Publication: 2018-01-19 14:54:40 UTC
39fd25aee9a1741809000d836a39f571 *DESCRIPTION d2fce6e507d0efd60a7fb4cf85c93085 *DESCRIPTION
aedc22cbc99fb22f0c1e8e482e998d7c *NAMESPACE aedc22cbc99fb22f0c1e8e482e998d7c *NAMESPACE
fce2762141312bab8313ec0d75e23c06 *R/AAA.R fce2762141312bab8313ec0d75e23c06 *R/AAA.R
f4c2e52c83ef80425d1467a804b4b9ba *R/CRS-methods.R ced5d3f8b6ec52e422b325550d7f2074 *R/CRS-methods.R
d456e8600c65ddd51043a01d79f20c18 *R/Class-CRS.R d456e8600c65ddd51043a01d79f20c18 *R/Class-CRS.R
4723a758016e8acadff5ad41118e9988 *R/Class-GridTopology.R 4723a758016e8acadff5ad41118e9988 *R/Class-GridTopology.R
81ba62d3b4edd0c603e49cbe390ca0eb *R/Class-Spatial.R 81ba62d3b4edd0c603e49cbe390ca0eb *R/Class-Spatial.R
...@@ -17,7 +17,7 @@ b08435fe1c6ce720e8d85c2888db3328 *R/Class-SpatialPoints.R ...@@ -17,7 +17,7 @@ b08435fe1c6ce720e8d85c2888db3328 *R/Class-SpatialPoints.R
253752974ba5f8094ebb1bc32f90cf4e *R/Class-SpatialPolygonsDataFrame.R 253752974ba5f8094ebb1bc32f90cf4e *R/Class-SpatialPolygonsDataFrame.R
b9fab3e3b03814dedf900e93f0ae6ca3 *R/GridTopology-methods.R b9fab3e3b03814dedf900e93f0ae6ca3 *R/GridTopology-methods.R
75dc7e568de7b42f50b544332162f28f *R/Spatial-methods.R 75dc7e568de7b42f50b544332162f28f *R/Spatial-methods.R
adb8ef6e4380f28e7fbb3b32d0614511 *R/SpatialGrid-methods.R 1de10ea2e7f729c065c7905af206b8d6 *R/SpatialGrid-methods.R
0655f85dad66fca4606f5f681e1d775c *R/SpatialGridDataFrame-methods.R 0655f85dad66fca4606f5f681e1d775c *R/SpatialGridDataFrame-methods.R
919f2d97da85df5c3ade4fc36924cbf3 *R/SpatialLines-methods.R 919f2d97da85df5c3ade4fc36924cbf3 *R/SpatialLines-methods.R
42e40b82be113b95fc75396f7c9955e9 *R/SpatialLinesDataFrame-methods.R 42e40b82be113b95fc75396f7c9955e9 *R/SpatialLinesDataFrame-methods.R
...@@ -40,7 +40,7 @@ bde15617ef63b08ac721f7f9d869f614 *R/asciigrid.R ...@@ -40,7 +40,7 @@ bde15617ef63b08ac721f7f9d869f614 *R/asciigrid.R
80028a8aeb01f6d8e930d5a928f776a9 *R/flipSGDF.R 80028a8aeb01f6d8e930d5a928f776a9 *R/flipSGDF.R
65578bd14f0d356a7858a4a7f3c5a243 *R/gridded.R 65578bd14f0d356a7858a4a7f3c5a243 *R/gridded.R
7cf0b72e1b4c162e638794affbf2aa8f *R/gridlines.R 7cf0b72e1b4c162e638794affbf2aa8f *R/gridlines.R
1286ea0635e86b391369c90644e3b2d1 *R/image.R d7a97f416719de492f125fcbb043cc1d *R/image.R
d5ccdeeeabffc927e3120fadac6128bd *R/loadmeuse.R d5ccdeeeabffc927e3120fadac6128bd *R/loadmeuse.R
227082b122be9fea35ecdf94ea6fb01d *R/mapasp.R 227082b122be9fea35ecdf94ea6fb01d *R/mapasp.R
d96ebb6ecfed6914a635f7e9a48a0984 *R/merge.R d96ebb6ecfed6914a635f7e9a48a0984 *R/merge.R
...@@ -59,7 +59,7 @@ a3562db0502c05e1f2610e572b65e703 *R/sp_spat1.R ...@@ -59,7 +59,7 @@ a3562db0502c05e1f2610e572b65e703 *R/sp_spat1.R
bddb25ec8f35a126373d42751aed191b *R/subset.R bddb25ec8f35a126373d42751aed191b *R/subset.R
1bf89e559504db11dd0379dbc071083f *R/surfaceArea.R 1bf89e559504db11dd0379dbc071083f *R/surfaceArea.R
14a49acb33c4c77157bd320c62616c66 *R/zerodist.R 14a49acb33c4c77157bd320c62616c66 *R/zerodist.R
a7187a79b2bb09fce1332f77824ef3a7 *build/vignette.rds 20e8561cd03f8c6e2ca96f6891b9522a *build/vignette.rds
72487cc74a945f4fc4b24fffd0131844 *data/Rlogo.rda 72487cc74a945f4fc4b24fffd0131844 *data/Rlogo.rda
02d4e4ae1918accd9cdadeaf1809a0a9 *data/meuse.area.rda 02d4e4ae1918accd9cdadeaf1809a0a9 *data/meuse.area.rda
74625a0d7da3999356f25f54a1a0b44e *data/meuse.grid.rda 74625a0d7da3999356f25f54a1a0b44e *data/meuse.grid.rda
...@@ -78,32 +78,32 @@ cd0b2eacb8bff453398f8cac02f83215 *demo/webmap.R ...@@ -78,32 +78,32 @@ cd0b2eacb8bff453398f8cac02f83215 *demo/webmap.R
d19545d6ff515de5e32e412a55ad370e *inst/NEWS.Rd d19545d6ff515de5e32e412a55ad370e *inst/NEWS.Rd
6ea05e88d7f4afaf0e6da1220c8884fb *inst/doc/csdacm.R 6ea05e88d7f4afaf0e6da1220c8884fb *inst/doc/csdacm.R
40c9c96c12943eab808dce21393af046 *inst/doc/csdacm.Rnw 40c9c96c12943eab808dce21393af046 *inst/doc/csdacm.Rnw
3bf7c1f290ce1cbe595d7b700114540d *inst/doc/csdacm.pdf 4a15b9f2c576a50d4cd817f5977d2ff5 *inst/doc/csdacm.pdf
a42170b8c0644c7b73857a291eafb881 *inst/doc/intro_sp.R a42170b8c0644c7b73857a291eafb881 *inst/doc/intro_sp.R
d55d2b03e6c3b28eafe79bf447970cc6 *inst/doc/intro_sp.Rnw d55d2b03e6c3b28eafe79bf447970cc6 *inst/doc/intro_sp.Rnw
6e1a483d14389faa1b2ba1927705907f *inst/doc/intro_sp.pdf 68dce05f3bf0353fc10d20275df750e5 *inst/doc/intro_sp.pdf
bd5e93d7e70556d83eaeb0401c97f2d1 *inst/doc/over.R bd5e93d7e70556d83eaeb0401c97f2d1 *inst/doc/over.R
6457da7ce638431f7839af4375fb8acd *inst/doc/over.Rnw 6457da7ce638431f7839af4375fb8acd *inst/doc/over.Rnw
603bfd53f31f29491fa670f87f6ac5ad *inst/doc/over.pdf 0438d47c079bf680f2c5040b5c00ed5f *inst/doc/over.pdf
1d14390f7c198db1b4f3fa00ae91cf14 *inst/external/seamap105_mod.csv 1d14390f7c198db1b4f3fa00ae91cf14 *inst/external/seamap105_mod.csv
ef247b6c335e75e48f81da7ef7554fa6 *inst/external/simple.ag ef247b6c335e75e48f81da7ef7554fa6 *inst/external/simple.ag
15c2101eb916ea116f400d560f73dd7c *inst/external/test.ag 15c2101eb916ea116f400d560f73dd7c *inst/external/test.ag
e6dc8d9aaf62afda17d6377a73d17100 *inst/include/sp.h c70aa48dd17621c88b8949a0cd4e1c9b *inst/include/sp.h
f351c52e6e0d706c360baa6d9f048572 *inst/include/sp_xports.c 38ac4247a0277e755f335c5c5dce2c28 *inst/include/sp_xports.c
947923a9e838d3f872f0456a01f3dbb2 *man/00sp.Rd 5dc0305fbc727b6354e05a0a07c23e8e *man/00sp.Rd
175e187b08fec0efaa2a0e97fbd584d9 *man/CRS-class.Rd 5d8c1c190553b97fa7d6f8ffe650e5f5 *man/CRS-class.Rd
5c196729fe648dbf5d5ee3aeeeb2569c *man/DMS-class.Rd 5c196729fe648dbf5d5ee3aeeeb2569c *man/DMS-class.Rd
8e3158a6e4810b3c5e9237383d071a7e *man/GridTopology-class.Rd 8e3158a6e4810b3c5e9237383d071a7e *man/GridTopology-class.Rd
613de6f8c7e25da7dff1842d5107341e *man/Line-class.Rd 613de6f8c7e25da7dff1842d5107341e *man/Line-class.Rd
5d809f7ce16e60d28894655dd23c7bf2 *man/Line.Rd 5d809f7ce16e60d28894655dd23c7bf2 *man/Line.Rd
50c887eafc899f7978ef6a07d09c4442 *man/Lines-class.Rd 21981e8f43ba21c764cdd5642917c09a *man/Lines-class.Rd
57d7ea3fda9d6ef1b179c0d6730bdffd *man/Polygon-class.Rd 57d7ea3fda9d6ef1b179c0d6730bdffd *man/Polygon-class.Rd
f9397832758ad0bc1417c4f2e8af0e63 *man/Polygons-class.Rd f9397832758ad0bc1417c4f2e8af0e63 *man/Polygons-class.Rd
c92dc2e2c0e4a5cde949d34987083d76 *man/Rlogo.Rd c92dc2e2c0e4a5cde949d34987083d76 *man/Rlogo.Rd
3e39874f667326acd36dd64f4b7d2440 *man/Spatial-class.Rd 3e39874f667326acd36dd64f4b7d2440 *man/Spatial-class.Rd
83b4e150736961ce00a897871a6850f5 *man/SpatialGrid-class.Rd 83b4e150736961ce00a897871a6850f5 *man/SpatialGrid-class.Rd
4bb278f0abc9f574c8b4afab05cb7837 *man/SpatialGrid.Rd 0d02a32af4348ba5672390340d1650c0 *man/SpatialGrid.Rd
b68c5a987afd7ab17240a2881fc47d68 *man/SpatialGridDataFrame-class.Rd 27f45d941775dcefc6cd1581bda41f0d *man/SpatialGridDataFrame-class.Rd
cf0e9d73973efa3269e6a65bada1754a *man/SpatialGridDataFrame.Rd cf0e9d73973efa3269e6a65bada1754a *man/SpatialGridDataFrame.Rd
603f0adef285c10b65a63068bc1299ec *man/SpatialLines-class.Rd 603f0adef285c10b65a63068bc1299ec *man/SpatialLines-class.Rd
2ca00133c77f7f64b2ae955608d82cf0 *man/SpatialLines.Rd 2ca00133c77f7f64b2ae955608d82cf0 *man/SpatialLines.Rd
...@@ -133,45 +133,45 @@ ec7752d4129e1c0adc387f6eaf6bf23d *man/asciigrid.Rd ...@@ -133,45 +133,45 @@ ec7752d4129e1c0adc387f6eaf6bf23d *man/asciigrid.Rd
91828b1582e869eea6dd71273ed67a65 *man/coordinates.Rd 91828b1582e869eea6dd71273ed67a65 *man/coordinates.Rd
0c29df057e7d5cb8f861379851d39043 *man/coordnames-methods.Rd 0c29df057e7d5cb8f861379851d39043 *man/coordnames-methods.Rd
d0f04d321528f5d429883bc8bda11371 *man/degaxis.Rd d0f04d321528f5d429883bc8bda11371 *man/degaxis.Rd
7816213f9c3212422441326b5323a42f *man/dimensions.Rd d842add84101367b1e4ad11b815d66ad *man/dimensions.Rd
1043d6d72ecca44a607c9a5f62126f4f *man/disaggregate.Rd 1043d6d72ecca44a607c9a5f62126f4f *man/disaggregate.Rd
fd50e71d1b89b6697d733ff7ec0160df *man/flip.Rd fd50e71d1b89b6697d733ff7ec0160df *man/flip.Rd
3545b530933efa96fa7c39ff4c52571b *man/geometry-methods.Rd 3545b530933efa96fa7c39ff4c52571b *man/geometry-methods.Rd
946863d5de28dc1c30dbb60d2e6b65ae *man/gridded-methods.Rd 9af0d87856831048b94546f0dd8b0cba *man/gridded-methods.Rd
e69b17e91071d5ca729ec06c2226e9f1 *man/gridindex2nb.Rd e69b17e91071d5ca729ec06c2226e9f1 *man/gridindex2nb.Rd
303740f4f3a16154c27975e4374e834f *man/gridlines.Rd 303740f4f3a16154c27975e4374e834f *man/gridlines.Rd
c1cc9f443a05014cb92705c7b47818d2 *man/image.Rd 55c7a0af77f53790ffcf7a6cc4b94cf9 *man/image.Rd
ed61d11542e27c16a7465fb227e2a435 *man/is.projected.Rd ed61d11542e27c16a7465fb227e2a435 *man/is.projected.Rd
d21143983ecd66ecb4bd0751d99579f5 *man/loadmeuse.Rd d21143983ecd66ecb4bd0751d99579f5 *man/loadmeuse.Rd
907a8e354d75f5d080476783f9c54166 *man/mapasp.Rd 907a8e354d75f5d080476783f9c54166 *man/mapasp.Rd
e11ab871998d837c5ecc48c16f837e40 *man/merge.Rd e11ab871998d837c5ecc48c16f837e40 *man/merge.Rd
df29ec70802551efa5697dad64f0cce6 *man/meuse.Rd aa25f57c388705caac6709081a57c954 *man/meuse.Rd
f17ead2fc674b4334dbdfe667d35f247 *man/meuse.grid.Rd f17ead2fc674b4334dbdfe667d35f247 *man/meuse.grid.Rd
67f42a0f50ed052b8cf481dc7f5c19ed *man/meuse.grid_ll.Rd 67f42a0f50ed052b8cf481dc7f5c19ed *man/meuse.grid_ll.Rd
9dd51fb645ba381af6f3cf44e8223220 *man/meuse.riv.Rd 9dd51fb645ba381af6f3cf44e8223220 *man/meuse.riv.Rd
c821d80c234f2bf40859f184c033594e *man/over.Rd a674391acb71289968457adc99472c89 *man/over.Rd
939d833407430d338b4560a74de9c171 *man/panel.Rd 939d833407430d338b4560a74de9c171 *man/panel.Rd
711ce4aa4329db10a14e35b417483bbc *man/point.in.polygon.Rd 711ce4aa4329db10a14e35b417483bbc *man/point.in.polygon.Rd
28647044030f08a19d5d40982f1cb797 *man/polygons-methods.Rd 28647044030f08a19d5d40982f1cb797 *man/polygons-methods.Rd
ba9488d7aef328e7c40d1ca0f9168f0c *man/polygons.Rd ba9488d7aef328e7c40d1ca0f9168f0c *man/polygons.Rd
6719f1cd4af1b8bc79c86983b7c14a05 *man/recenter-methods.Rd 249eab8bc2808d8ef5a05333f97e8e93 *man/recenter-methods.Rd
fb2d7d3cc0396cb00f9032516394da91 *man/select.spatial.Rd fb2d7d3cc0396cb00f9032516394da91 *man/select.spatial.Rd
6ad78b876190e698ef7f33226d021b46 *man/sp-deprecated.Rd 6ad78b876190e698ef7f33226d021b46 *man/sp-deprecated.Rd
586721930ea6d6ac5743f9774a5cd81e *man/spChFIDs-methods.Rd 586721930ea6d6ac5743f9774a5cd81e *man/spChFIDs-methods.Rd
7d5e4ae4b1f21f9e2e32f6346b71a79e *man/spDistsN1.Rd 7d5e4ae4b1f21f9e2e32f6346b71a79e *man/spDistsN1.Rd
ebae2801ac24d2162ed6d78b0b2f3c4e *man/spTransform.Rd ebae2801ac24d2162ed6d78b0b2f3c4e *man/spTransform.Rd
1660ee48f428b238efc50e1eb00af533 *man/spplot.Rd 1660ee48f428b238efc50e1eb00af533 *man/spplot.Rd
0e754f4f254890f8bf884c3681a0086e *man/spsample.Rd da23cb2de494ded9ab5b7f0c4d93ba9f *man/spsample.Rd
b0a89e8c8f714d9c3be05773e23f4f5d *man/stack.Rd b0a89e8c8f714d9c3be05773e23f4f5d *man/stack.Rd
2d10c7a98bbe0333f1f97e671a67d9ec *man/surfaceArea.Rd 2d10c7a98bbe0333f1f97e671a67d9ec *man/surfaceArea.Rd
43149291777e745770d530bbab97e992 *man/zerodist.Rd 3703e84a4c133b7671f621075b721c88 *man/zerodist.Rd
b1efa15042518ac8f870d15e2fe27d06 *src/Rcentroid.c b1efa15042518ac8f870d15e2fe27d06 *src/Rcentroid.c
0c91f14e74f32fbad23af71c2c75d28a *src/gcdist.c 0c91f14e74f32fbad23af71c2c75d28a *src/gcdist.c
45c922d69dabf0504570ef94da147bd4 *src/init.c 45c922d69dabf0504570ef94da147bd4 *src/init.c
36d13e215d58fffb9561bc3dd1e455ea *src/pip.c 2a79f2e9cd38e6603c529ed704eab7b9 *src/pip.c
a7dbe4fe00de2649196847caf161f795 *src/pip2.c 7b048d7af80064b653b049fce283d2a4 *src/pip2.c
e6dc8d9aaf62afda17d6377a73d17100 *src/sp.h c70aa48dd17621c88b8949a0cd4e1c9b *src/sp.h
f351c52e6e0d706c360baa6d9f048572 *src/sp_xports.c 38ac4247a0277e755f335c5c5dce2c28 *src/sp_xports.c
69af476fca6ecdc9d23bd31caa086283 *src/surfaceArea.c 69af476fca6ecdc9d23bd31caa086283 *src/surfaceArea.c
8f31429f883966a9061bfe95d943edd5 *src/zerodist.c 8f31429f883966a9061bfe95d943edd5 *src/zerodist.c
036b835d76faf02e1f53048d2c4b4adf *tests/agg.R 036b835d76faf02e1f53048d2c4b4adf *tests/agg.R
...@@ -188,7 +188,7 @@ f5d03d21e7afac59633bb1f82311209f *tests/grid.Rout.save ...@@ -188,7 +188,7 @@ f5d03d21e7afac59633bb1f82311209f *tests/grid.Rout.save
a1b47eec3c258fb259fa66f5368aeb71 *tests/over2.R a1b47eec3c258fb259fa66f5368aeb71 *tests/over2.R
2b67694cb7cd86bf403ae7d210d64c96 *tests/over2.Rout.save 2b67694cb7cd86bf403ae7d210d64c96 *tests/over2.Rout.save
82fcaacdbfe8f9846eeccc663e6ab8ae *tests/pass1.R 82fcaacdbfe8f9846eeccc663e6ab8ae *tests/pass1.R
7a658a2a5f837c0961d275d2e23078b6 *tests/pass1.Rout.save a4f9255cbfae3ba22738f01bb646dc07 *tests/pass1.Rout.save
f7754a48738a34642132763a216d00b0 *tests/point.in.polygon.R f7754a48738a34642132763a216d00b0 *tests/point.in.polygon.R
a515e869a5324a8790ea0d5ff6a41b2b *tests/point.in.polygon.Rout.save a515e869a5324a8790ea0d5ff6a41b2b *tests/point.in.polygon.Rout.save
c5b0bdc5dbc743b4b7f5fddc1af1e72b *tests/sel.R c5b0bdc5dbc743b4b7f5fddc1af1e72b *tests/sel.R
......
...@@ -65,13 +65,19 @@ setMethod("show", "CRS", function(object) print.CRS(object)) ...@@ -65,13 +65,19 @@ setMethod("show", "CRS", function(object) print.CRS(object))
identicalCRS = function(x, y) { identicalCRS = function(x, y) {
if (! missing(y)) if (! missing(y))
identical(CRS(proj4string(x)), CRS(proj4string(y))) identicalCRS1(CRS(proj4string(x)), CRS(proj4string(y)))
else { # x has to be list: else { # x has to be list:
stopifnot(is.list(x)) stopifnot(is.list(x))
if (length(x) > 1) { if (length(x) > 1) {
p1 = CRS(proj4string(x[[1]])) p1 = CRS(proj4string(x[[1]]))
!any(!sapply(x[-1], function(p2) identical(CRS(proj4string(p2)), p1))) !any(!sapply(x[-1], function(p2) identicalCRS1(CRS(proj4string(p2)), p1)))
} else } else
TRUE TRUE
} }
} }
identicalCRS1 = function(x, y) {
args_x <- strsplit(x@projargs, " +")[[1]]
args_y <- strsplit(y@projargs, " +")[[1]]
setequal(args_x, args_y)
}
...@@ -28,6 +28,8 @@ SpatialGrid = function(grid, proj4string = CRS(as.character(NA))) { ...@@ -28,6 +28,8 @@ SpatialGrid = function(grid, proj4string = CRS(as.character(NA))) {
setAs("SpatialGrid", "SpatialPixels", setAs("SpatialGrid", "SpatialPixels",
function(from) { function(from) {
pts = as(from, "SpatialPoints") pts = as(from, "SpatialPoints")
pts@bbox[,1] = pts@bbox[,1] - 0.5 * from@grid@cellsize
pts@bbox[,2] = pts@bbox[,2] + 0.5 * from@grid@cellsize
new("SpatialPixels", pts, grid = from@grid, grid.index = 1:length(pts)) new("SpatialPixels", pts, grid = from@grid, grid.index = 1:length(pts))
} }
) )
......
...@@ -13,7 +13,7 @@ image.SpatialGridDataFrame = function(x, attr = 1, xcol = 1, ycol = 2, ...@@ -13,7 +13,7 @@ image.SpatialGridDataFrame = function(x, attr = 1, xcol = 1, ycol = 2,
red=NULL, green=NULL, blue=NULL, axes = FALSE, xlim = NULL, red=NULL, green=NULL, blue=NULL, axes = FALSE, xlim = NULL,
ylim = NULL, add = FALSE, ..., asp = NA, ylim = NULL, add = FALSE, ..., asp = NA,
setParUsrBB=FALSE, interpolate = FALSE, angle = 0, setParUsrBB=FALSE, interpolate = FALSE, angle = 0,
useRasterImage=(!.isSDI() && missing(breaks)), breaks, useRasterImage = missing(breaks), breaks,
zlim = range(as.numeric(x[[attr]])[is.finite(x[[attr]])])) { zlim = range(as.numeric(x[[attr]])[is.finite(x[[attr]])])) {
if (!add) if (!add)
...@@ -22,8 +22,6 @@ image.SpatialGridDataFrame = function(x, attr = 1, xcol = 1, ycol = 2, ...@@ -22,8 +22,6 @@ image.SpatialGridDataFrame = function(x, attr = 1, xcol = 1, ycol = 2,
setParUsrBB=setParUsrBB)) setParUsrBB=setParUsrBB))
if (exists("rasterImage") && useRasterImage) { if (exists("rasterImage") && useRasterImage) {
if (.isSDI())
warning("Bug in SDI raster handling - your R graphics window may stop displaying output")
bb <- bbox(x) bb <- bbox(x)
scl <- function(xx, zlim) { scl <- function(xx, zlim) {
xx = matrix(as.numeric(xx), nrow(xx), ncol(xx)) xx = matrix(as.numeric(xx), nrow(xx), ncol(xx))
...@@ -156,23 +154,6 @@ image2Grid <- function (im, p4 = as.character(NA), digits=10) ...@@ -156,23 +154,6 @@ image2Grid <- function (im, p4 = as.character(NA), digits=10)
ncol(im$z):1])), proj4string = CRS(p4)) ncol(im$z):1])), proj4string = CRS(p4))
} }
# copied from the svMisc package, copyright Philippe Grosjean,
# Romain Francois & Kamil Barton
".isSDI" <- function()
{
# This function is specific to Windows, but it is defined everywhere
# so that we don't have to test the platform before use!
# Check if Rgui was started in SDI mode (needed by some GUI clients)
# 1) First is it Rgui?
if (!.Platform$GUI[1] == "Rgui")
return(FALSE) # This is not Rgui
# RGui SDI mode: returns "R Console", in MDI mode: returns "RGui"
if (getIdentification() == "R Console") return(TRUE) else return(FALSE)
}
# menugget, # menugget,
# from https://gist.github.com/menugget/7689145/raw/dac746aa322ca4160a5fe66c70fec16ebe26faf9/image.scale.2.r # from https://gist.github.com/menugget/7689145/raw/dac746aa322ca4160a5fe66c70fec16ebe26faf9/image.scale.2.r
......
No preview for this file type
r-cran-sp (1:1.2-7-1) unstable; urgency=medium
* New upstream version
* Standards-Version: 4.1.3
* debhelper 11
-- Andreas Tille <tille@debian.org> Wed, 14 Mar 2018 09:42:19 +0100
r-cran-sp (1:1.2-5-3) unstable; urgency=medium r-cran-sp (1:1.2-5-3) unstable; urgency=medium
* Team upload. * Team upload.
......
...@@ -3,11 +3,11 @@ Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian. ...@@ -3,11 +3,11 @@ Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.
Uploaders: Andreas Tille <tille@debian.org> Uploaders: Andreas Tille <tille@debian.org>
Section: gnu-r Section: gnu-r
Priority: optional Priority: optional
Build-Depends: debhelper (>= 10), Build-Depends: debhelper (>= 11~),
dh-r, dh-r,
r-base-dev, r-base-dev,
r-cran-lattice r-cran-lattice
Standards-Version: 4.1.1 Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/r-cran-sp.git Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/r-cran-sp.git
Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/r-cran-sp.git Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/r-cran-sp.git
Homepage: https://cran.r-project.org/package=sp Homepage: https://cran.r-project.org/package=sp
......
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#endif #endif
/* remember to touch local_stubs.c */ /* remember to touch local_stubs.c */
#define SP_VERSION "1.2-5" #define SP_VERSION "1.2-7"
#include <R.h> #include <R.h>
/* RSB 091203 */ /* RSB 091203 */
......
...@@ -46,7 +46,7 @@ SEXP SP_PREFIX(Polygon_c)(const SEXP coords, const SEXP n, const SEXP ihole) { ...@@ -46,7 +46,7 @@ SEXP SP_PREFIX(Polygon_c)(const SEXP coords, const SEXP n, const SEXP ihole) {
INTEGER_POINTER(dim1)[1] = 2; INTEGER_POINTER(dim1)[1] = 2;
setAttrib(ccopy, R_DimSymbol, dim1); setAttrib(ccopy, R_DimSymbol, dim1);
} else { } else {
if (NAMED(coords)) { if (MAYBE_REFERENCED(coords)) {
PROTECT(ccopy = duplicate(coords)); PROTECT(ccopy = duplicate(coords));
pc++; pc++;
} else } else
...@@ -185,18 +185,18 @@ SEXP SP_PREFIX(Polygons_c)(const SEXP pls, const SEXP ID) { ...@@ -185,18 +185,18 @@ SEXP SP_PREFIX(Polygons_c)(const SEXP pls, const SEXP ID) {
int *po, *holes; int *po, *holes;
SEXP valid; SEXP valid;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
pls1 = pls; pls1 = pls;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(ID)) { if (MAYBE_REFERENCED(ID)) {
PROTECT(ID1 = duplicate(ID)); PROTECT(ID1 = duplicate(ID));
pc++; pc++;
} else } else
ID1 = ID; ID1 = ID;
// PROTECT(ID1 = NAMED(ID) ? duplicate(ID) : ID); pc++; // PROTECT(ID1 = MAYBE_REFERENCED(ID) ? duplicate(ID) : ID); pc++;
nps = length(pls1); nps = length(pls1);
fuzz = R_pow(DOUBLE_EPS, (2.0/3.0)); fuzz = R_pow(DOUBLE_EPS, (2.0/3.0));
...@@ -322,9 +322,9 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO, ...@@ -322,9 +322,9 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO,
int pc=0; int pc=0;
PROTECT(ans = NEW_OBJECT(MAKE_CLASS("SpatialPolygons"))); pc++; PROTECT(ans = NEW_OBJECT(MAKE_CLASS("SpatialPolygons"))); pc++;
// SET_SLOT(ans, install("polygons"), NAMED(pls) ? duplicate(pls) : pls); // SET_SLOT(ans, install("polygons"), MAYBE_REFERENCED(pls) ? duplicate(pls) : pls);
SET_SLOT(ans, install("polygons"), pls); SET_SLOT(ans, install("polygons"), pls);
// SET_SLOT(ans, install("proj4string"), NAMED(p4s) ? duplicate(p4s) : p4s); // SET_SLOT(ans, install("proj4string"), MAYBE_REFERENCED(p4s) ? duplicate(p4s) : p4s);
SET_SLOT(ans, install("proj4string"), p4s); SET_SLOT(ans, install("proj4string"), p4s);
if (pO == R_NilValue) { if (pO == R_NilValue) {
...@@ -332,7 +332,7 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO, ...@@ -332,7 +332,7 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO,
pc++; pc++;
} else } else
ppO = pO; ppO = pO;
// SET_SLOT(ans, install("plotOrder"), NAMED(pO) ? duplicate(pO) : pO); // SET_SLOT(ans, install("plotOrder"), MAYBE_REFERENCED(pO) ? duplicate(pO) : pO);
SET_SLOT(ans, install("plotOrder"), ppO); SET_SLOT(ans, install("plotOrder"), ppO);
PROTECT(bbox = SP_PREFIX(bboxCalcR_c(pls))); pc++; PROTECT(bbox = SP_PREFIX(bboxCalcR_c(pls))); pc++;
...@@ -350,8 +350,8 @@ SEXP SP_PREFIX(SpatialPolygons_plotOrder_c)(const SEXP pls) { ...@@ -350,8 +350,8 @@ SEXP SP_PREFIX(SpatialPolygons_plotOrder_c)(const SEXP pls) {
int *po; int *po;
double *areas; double *areas;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
...@@ -416,8 +416,8 @@ SEXP SP_PREFIX(SpatialPolygons_getIDs_c)(const SEXP obj) { ...@@ -416,8 +416,8 @@ SEXP SP_PREFIX(SpatialPolygons_getIDs_c)(const SEXP obj) {
int i, n; int i, n;
SEXP pls, IDs, obj1; SEXP pls, IDs, obj1;
// PROTECT(obj1 = NAMED(obj) ? duplicate(obj) : obj); pc++; // PROTECT(obj1 = MAYBE_REFERENCED(obj) ? duplicate(obj) : obj); pc++;
if (NAMED(obj)) { if (MAYBE_REFERENCED(obj)) {
PROTECT(obj1 = duplicate(obj)); PROTECT(obj1 = duplicate(obj));
pc++; pc++;
} else } else
...@@ -442,8 +442,8 @@ SEXP SP_PREFIX(bboxCalcR_c)(const SEXP pls) { ...@@ -442,8 +442,8 @@ SEXP SP_PREFIX(bboxCalcR_c)(const SEXP pls) {
int i, j, k, n, npls, npl, pc=0; int i, j, k, n, npls, npl, pc=0;
double x, y; double x, y;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
...@@ -559,8 +559,8 @@ SEXP SP_PREFIX(comment2comm)(const SEXP obj) { ...@@ -559,8 +559,8 @@ SEXP SP_PREFIX(comment2comm)(const SEXP obj) {
char s[15], *buf; char s[15], *buf;
int *c, *nss, *co, *coo; int *c, *nss, *co, *coo;
// PROTECT(obj1 = NAMED(obj) ? duplicate(obj) : obj); pc++; // PROTECT(obj1 = MAYBE_REFERENCED(obj) ? duplicate(obj) : obj); pc++;
if (NAMED(obj)) { if (MAYBE_REFERENCED(obj)) {
PROTECT(obj1 = duplicate(obj)); PROTECT(obj1 = duplicate(obj));
pc++; pc++;
} else } else
......
...@@ -73,7 +73,7 @@ is stored or a partial grid (i.e., only the non-missing valued cells); ...@@ -73,7 +73,7 @@ is stored or a partial grid (i.e., only the non-missing valued cells);
calling \link{coordinates} on them will give the coordinates for the calling \link{coordinates} on them will give the coordinates for the
grid cells. grid cells.
SpatialPoints, SpatialPixels and SpatialGrid can be of arbitray SpatialPoints, SpatialPixels and SpatialGrid can be of arbitrary
dimension, although most of the effort is in making them work for two dimension, although most of the effort is in making them work for two
dimensional data. dimensional data.
......
...@@ -28,7 +28,7 @@ identicalCRS(x,y) ...@@ -28,7 +28,7 @@ identicalCRS(x,y)
} }
\arguments{ \arguments{
\item{projargs}{A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation; if the projection is unknown, use \code{as.character(NA)}, it may be missing or an empty string of zero length and will then set to the missing value.} \item{projargs}{A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation; if the projection is unknown, use \code{as.character(NA)}, it may be missing or an empty string of zero length and will then set to the missing value.}
\item{doCheckCRSArgs}{default TRUE, must be set to FALSE by package developers including \code{CRS} in an S4 class definition to avoid uncontrolable loading of the \pkg{rgdal} namespace} \item{doCheckCRSArgs}{default TRUE, must be set to FALSE by package developers including \code{CRS} in an S4 class definition to avoid uncontrollable loading of the \pkg{rgdal} namespace}
\item{x}{object having a \link{proj4string} method, \item{x}{object having a \link{proj4string} method,
or if \code{y} is missing, list with objects that have a \code{proj4string} method} or if \code{y} is missing, list with objects that have a \code{proj4string} method}
\item{y}{object of class \link{Spatial}, or having a \link{proj4string} method} \item{y}{object of class \link{Spatial}, or having a \link{proj4string} method}
......
...@@ -12,7 +12,7 @@ Objects can be created by calls to the function \link{Line} ...@@ -12,7 +12,7 @@ Objects can be created by calls to the function \link{Line}
\describe{ \describe{
\item{\code{Lines}:}{Object of class \code{"list"}, containing elements \item{\code{Lines}:}{Object of class \code{"list"}, containing elements
of class \link{Line-class}} of class \link{Line-class}}
\item{\code{ID}:}{\code{"character"} vector of lenght one, with unique identifier string} \item{\code{ID}:}{\code{"character"} vector of length one, with unique identifier string}
} }
} }
\section{Methods}{ \section{Methods}{
......
...@@ -73,7 +73,7 @@ SpatialGrid stores grid topology and may or may not store the coordinates ...@@ -73,7 +73,7 @@ SpatialGrid stores grid topology and may or may not store the coordinates
of the actual points, which may form a subset of the full grid. To find of the actual points, which may form a subset of the full grid. To find
out or change this, see \link{fullgrid}. out or change this, see \link{fullgrid}.
points2grid tries to figure out the grid topology from points. It succees points2grid tries to figure out the grid topology from points. It succeeds
only if points on a grid line have constant y column, and points on a only if points on a grid line have constant y column, and points on a
grid column have constant x coordinate, etc. In other cases, use signif grid column have constant x coordinate, etc. In other cases, use signif
on the raw coordinate matrices to make sure this is the case. on the raw coordinate matrices to make sure this is the case.
......
...@@ -63,14 +63,14 @@ objects take the following arguments: ...@@ -63,14 +63,14 @@ objects take the following arguments:
\item{attr}{ integer or character, indicating the attribute variable to be plotted; default 1} \item{attr}{ integer or character, indicating the attribute variable to be plotted; default 1}
\item{col}{ color ramp to be used; default \code{bpy.colors(100)} for continuous, or \item{col}{ color ramp to be used; default \code{bpy.colors(100)} for continuous, or
\code{RColorBrewer::brewer.pal(nlevels(x[[1]]), "Set2")} for factor variables} \code{RColorBrewer::brewer.pal(nlevels(x[[1]]), "Set2")} for factor variables}
\item{breaks}{ for continous attributes: values at which color breaks should take place } \item{breaks}{ for continuous attributes: values at which color breaks should take place }
\item{zlim}{ for continuous attributes: \item{zlim}{ for continuous attributes:
numeric of length 2, specifying the range of attribute values to be plotted; numeric of length 2, specifying the range of attribute values to be plotted;
default to data range \code{range(as.numeric(x[[attr]])[is.finite(x[[attr]])])}} default to data range \code{range(as.numeric(x[[attr]])[is.finite(x[[attr]])])}}
\item{axes}{ logical: draw x and y axes? default \code{FALSE}} \item{axes}{ logical: draw x and y axes? default \code{FALSE}}
\item{xaxs}{character, default "i", see \link{par}} \item{xaxs}{character, default "i", see \link{par}}
\item{yaxs}{character, default equal to \code{xaxs}, see \link{par}} \item{yaxs}{character, default equal to \code{xaxs}, see \link{par}}
\item{at}{numeric or NULL, values at which axis tics and labes should be drawn; default NULL (use \link{pretty})} \item{at}{numeric or NULL, values at which axis tics and labels should be drawn; default NULL (use \link{pretty})}
\item{border}{color, to be used for drawing grid lines; default NA (don't draw grid lines)} \item{border}{color, to be used for drawing grid lines; default NA (don't draw grid lines)}
\item{axis.pos}{integer, 1-4; default 4, see \link{axis}} \item{axis.pos}{integer, 1-4; default 4, see \link{axis}}
\item{add.axis}{logical: draw axis along scale? default \code{TRUE}} \item{add.axis}{logical: draw axis along scale? default \code{TRUE}}
......
...@@ -15,7 +15,7 @@ retrieves spatial dimensions box from spatial data ...@@ -15,7 +15,7 @@ retrieves spatial dimensions box from spatial data
} }
\section{Methods}{ \section{Methods}{
\describe{ \describe{
\item{obj = "Spatial"}{ object deriviving from class "Spatial" } \item{obj = "Spatial"}{ object deriving from class "Spatial" }
}} }}
\value{ two-column matrix; the first column has the minimum, \value{ two-column matrix; the first column has the minimum,
the second the maximum values; rows represent the spatial the second the maximum values; rows represent the spatial
......
...@@ -39,13 +39,13 @@ one, or demotes a gridded structure back to a non-structured one. ...@@ -39,13 +39,13 @@ one, or demotes a gridded structure back to a non-structured one.
gridparameters(obj) gridparameters(obj)
} }
\arguments{ \arguments{
\item{obj}{ object deriviving from class "Spatial" (for gridded), or \item{obj}{ object deriving from class "Spatial" (for gridded), or
object of class \link{SpatialGridDataFrame-class} (for fullgrid and gridparameters)} object of class \link{SpatialGridDataFrame-class} (for fullgrid and gridparameters)}
\item{value}{logical replacement values, TRUE or FALSE} \item{value}{logical replacement values, TRUE or FALSE}
} }
\section{Methods}{ \section{Methods}{
\describe{ \describe{
\item{obj = "Spatial"}{ object deriviving from class "Spatial" } \item{obj = "Spatial"}{ object deriving from class "Spatial" }
}} }}
\value{ if obj derives from class Spatial, gridded(object) will tell \value{ if obj derives from class Spatial, gridded(object) will tell
whether it is has topology on a regular grid; if assigned TRUE, if the whether it is has topology on a regular grid; if assigned TRUE, if the
......
...@@ -16,7 +16,7 @@ objects. } ...@@ -16,7 +16,7 @@ objects. }
axes = FALSE, xlim = NULL, axes = FALSE, xlim = NULL,
ylim = NULL, add = FALSE, ..., asp = NA, setParUsrBB=FALSE, ylim = NULL, add = FALSE, ..., asp = NA, setParUsrBB=FALSE,
interpolate = FALSE, angle = 0, interpolate = FALSE, angle = 0,
useRasterImage = (!.isSDI() && missing(breaks)), breaks, useRasterImage = missing(breaks), breaks,
zlim = range(as.numeric(x[[attr]])[is.finite(x[[attr]])])) zlim = range(as.numeric(x[[attr]])[is.finite(x[[attr]])]))
\method{image}{SpatialPixelsDataFrame}(x, ...) \method{image}{SpatialPixelsDataFrame}(x, ...)
\method{image}{SpatialPixels}(x, ...) \method{image}{SpatialPixels}(x, ...)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\docType{data} \docType{data}
\title{Meuse river data set} \title{Meuse river data set}
\description{ \description{
This data set gives locations and topsoil heavy metal concentrations, along with a number of soil and landscape variablesat the observation locations, collected in a flood plain of the river Meuse, near the village of Stein (NL). Heavy metal concentrations are from composite samples of an area of approximately 15 m x 15 m. This data set gives locations and topsoil heavy metal concentrations, along with a number of soil and landscape variables at the observation locations, collected in a flood plain of the river Meuse, near the village of Stein (NL). Heavy metal concentrations are from composite samples of an area of approximately 15 m x 15 m.
} }
\format{ \format{
This data frame contains the following columns: This data frame contains the following columns:
......
...@@ -75,7 +75,7 @@ with the inner and boundary of each \code{y} geometry. The order ...@@ -75,7 +75,7 @@ with the inner and boundary of each \code{y} geometry. The order
in which matched \code{y} geometries are returned is determined by in which matched \code{y} geometries are returned is determined by
the dimension of the overlap (2: area overlap, 1: line in common, the dimension of the overlap (2: area overlap, 1: line in common,
0: point in common), and then by the position in the string (1, 0: point in common), and then by the position in the string (1,
2, 4, 5, meaning points in polygons are prefered over points on 2, 4, 5, meaning points in polygons are preferred over points on
polygon boundaries). polygon boundaries).
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
\alias{recenter,Line-method} \alias{recenter,Line-method}
\title{Methods for Function recenter in Package `sp'} \title{Methods for Function recenter in Package `sp'}
\description{ \description{
Methods for function \code{recenter} in package \pkg{sp} to shift or re-center geographical coordinates for a Pacific view. All longitudes < 0 are added to 360, to avoid for instance parts of Alaska being represented on the far left and right of a plot because they have values straddling 180 degrees. In general, using a projected coordinate reference system is to be prefered, but this method permits a geographical coordinate reference system to be used. This idea was suggested by Greg Snow, and corresponds to the two world representations in the \pkg{maps} package. Methods for function \code{recenter} in package \pkg{sp} to shift or re-center geographical coordinates for a Pacific view. All longitudes < 0 are added to 360, to avoid for instance parts of Alaska being represented on the far left and right of a plot because they have values straddling 180 degrees. In general, using a projected coordinate reference system is to be preferred, but this method permits a geographical coordinate reference system to be used. This idea was suggested by Greg Snow, and corresponds to the two world representations in the \pkg{maps} package.
} }
\section{Methods}{ \section{Methods}{
\describe{ \describe{
......
...@@ -26,7 +26,7 @@ makegrid(x, n = 10000, nsig = 2, cellsize, offset = rep(0.5, nrow(bb)), ...@@ -26,7 +26,7 @@ makegrid(x, n = 10000, nsig = 2, cellsize, offset = rep(0.5, nrow(bb)),
} }
\arguments{ \arguments{
\item{x}{Spatial object; \code{spsample(x,...)} is a generic method for the \item{x}{Spatial object; \code{spsample(x,...)} is a generic method for the
existing \code{sample.Xxx} fumctions} existing \code{sample.Xxx} functions}
\item{...}{ optional arguments, passed to the appropriate \code{sample.Xxx} \item{...}{ optional arguments, passed to the appropriate \code{sample.Xxx}
functions; see NOTES for \code{nclusters} and \code{iter}} functions; see NOTES for \code{nclusters} and \code{iter}}
\item{n}{ (approximate) sample size } \item{n}{ (approximate) sample size }
......
...@@ -16,7 +16,7 @@ remove.duplicates(obj, zero = 0.0, remove.second = TRUE, memcmp = TRUE) ...@@ -16,7 +16,7 @@ remove.duplicates(obj, zero = 0.0, remove.second = TRUE, memcmp = TRUE)
\item{zero}{ distance values less than or equal to this threshold value are \item{zero}{ distance values less than or equal to this threshold value are
considered to have zero distance (default 0.0); considered to have zero distance (default 0.0);
units are those of the coordinates for projected data or unknown projection, units are those of the coordinates for projected data or unknown projection,
or km if coordinates are defined to be longitute/latitude } or km if coordinates are defined to be longitude/latitude }
\item{unique.ID}{logical; if TRUE, return an ID (integer) for each point \item{unique.ID}{logical; if TRUE, return an ID (integer) for each point
that is different only when two points do not share the same location } that is different only when two points do not share the same location }
\item{memcmp}{use \code{memcmp} to find exactly equal coordinates; see NOTE} \item{memcmp}{use \code{memcmp} to find exactly equal coordinates; see NOTE}
......
...@@ -10,22 +10,22 @@ SEXP R_point_in_polygon_sp(const SEXP px, const SEXP py, const SEXP polx, ...@@ -10,22 +10,22 @@ SEXP R_point_in_polygon_sp(const SEXP px, const SEXP py, const SEXP polx,
POLYGON pol; POLYGON pol;
SEXP ret, px1, py1, polx1, poly1; SEXP ret, px1, py1, polx1, poly1;
if (NAMED(px)) { if (MAYBE_REFERENCED(px)) {
PROTECT(px1 = duplicate(px)); PROTECT(px1 = duplicate(px));
pc++; pc++;
} else } else
px1 = px; px1 = px;
if (NAMED(py)) { if (MAYBE_REFERENCED(py)) {
PROTECT(py1 = duplicate(py)); PROTECT(py1 = duplicate(py));
pc++; pc++;
} else } else
py1 = py; py1 = py;
if (NAMED(polx)) { if (MAYBE_REFERENCED(polx)) {
PROTECT(polx1 = duplicate(polx)); PROTECT(polx1 = duplicate(polx));
pc++; pc++;
} else } else
polx1 = polx; polx1 = polx;
if (NAMED(poly)) { if (MAYBE_REFERENCED(poly)) {
PROTECT(poly1 = duplicate(poly)); PROTECT(poly1 = duplicate(poly));
pc++; pc++;
} else } else
......
...@@ -51,21 +51,21 @@ SEXP pointsInBox(const SEXP lb, const SEXP px, const SEXP py) { ...@@ -51,21 +51,21 @@ SEXP pointsInBox(const SEXP lb, const SEXP px, const SEXP py) {
SEXP res, px1, py1, lb1; SEXP res, px1, py1, lb1;
/* /*
PROTECT(px1 = NAMED(px) ? duplicate(px) : px); pc++; PROTECT(px1 = MAYBE_REFERENCED(px) ? duplicate(px) : px); pc++;
PROTECT(py1 = NAMED(py) ? duplicate(py) : py); pc++; PROTECT(py1 = MAYBE_REFERENCED(py) ? duplicate(py) : py); pc++;
PROTECT(lb1 = NAMED(lb) ? duplicate(lb) : lb); pc++; PROTECT(lb1 = MAYBE_REFERENCED(lb) ? duplicate(lb) : lb); pc++;
*/ */
if (NAMED(px)) { if (MAYBE_REFERENCED(px)) {
PROTECT(px1 = duplicate(px)); PROTECT(px1 = duplicate(px));
pc++; pc++;
} else } else
px1 = px; px1 = px;
if (NAMED(py)) { if (MAYBE_REFERENCED(py)) {
PROTECT(py1 = duplicate(py)); PROTECT(py1 = duplicate(py));
pc++; pc++;
} else } else
py1 = py; py1 = py;
if (NAMED(lb)) { if (MAYBE_REFERENCED(lb)) {
PROTECT(lb1 = duplicate(lb)); PROTECT(lb1 = duplicate(lb));
pc++; pc++;
} else } else
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#endif #endif
/* remember to touch local_stubs.c */ /* remember to touch local_stubs.c */
#define SP_VERSION "1.2-5" #define SP_VERSION "1.2-7"
#include <R.h> #include <R.h>
/* RSB 091203 */ /* RSB 091203 */
......
...@@ -46,7 +46,7 @@ SEXP SP_PREFIX(Polygon_c)(const SEXP coords, const SEXP n, const SEXP ihole) { ...@@ -46,7 +46,7 @@ SEXP SP_PREFIX(Polygon_c)(const SEXP coords, const SEXP n, const SEXP ihole) {
INTEGER_POINTER(dim1)[1] = 2; INTEGER_POINTER(dim1)[1] = 2;
setAttrib(ccopy, R_DimSymbol, dim1); setAttrib(ccopy, R_DimSymbol, dim1);
} else { } else {
if (NAMED(coords)) { if (MAYBE_REFERENCED(coords)) {
PROTECT(ccopy = duplicate(coords)); PROTECT(ccopy = duplicate(coords));
pc++; pc++;
} else } else
...@@ -185,18 +185,18 @@ SEXP SP_PREFIX(Polygons_c)(const SEXP pls, const SEXP ID) { ...@@ -185,18 +185,18 @@ SEXP SP_PREFIX(Polygons_c)(const SEXP pls, const SEXP ID) {
int *po, *holes; int *po, *holes;
SEXP valid; SEXP valid;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
pls1 = pls; pls1 = pls;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(ID)) { if (MAYBE_REFERENCED(ID)) {
PROTECT(ID1 = duplicate(ID)); PROTECT(ID1 = duplicate(ID));
pc++; pc++;
} else } else
ID1 = ID; ID1 = ID;
// PROTECT(ID1 = NAMED(ID) ? duplicate(ID) : ID); pc++; // PROTECT(ID1 = MAYBE_REFERENCED(ID) ? duplicate(ID) : ID); pc++;
nps = length(pls1); nps = length(pls1);
fuzz = R_pow(DOUBLE_EPS, (2.0/3.0)); fuzz = R_pow(DOUBLE_EPS, (2.0/3.0));
...@@ -322,9 +322,9 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO, ...@@ -322,9 +322,9 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO,
int pc=0; int pc=0;
PROTECT(ans = NEW_OBJECT(MAKE_CLASS("SpatialPolygons"))); pc++; PROTECT(ans = NEW_OBJECT(MAKE_CLASS("SpatialPolygons"))); pc++;
// SET_SLOT(ans, install("polygons"), NAMED(pls) ? duplicate(pls) : pls); // SET_SLOT(ans, install("polygons"), MAYBE_REFERENCED(pls) ? duplicate(pls) : pls);
SET_SLOT(ans, install("polygons"), pls); SET_SLOT(ans, install("polygons"), pls);
// SET_SLOT(ans, install("proj4string"), NAMED(p4s) ? duplicate(p4s) : p4s); // SET_SLOT(ans, install("proj4string"), MAYBE_REFERENCED(p4s) ? duplicate(p4s) : p4s);
SET_SLOT(ans, install("proj4string"), p4s); SET_SLOT(ans, install("proj4string"), p4s);
if (pO == R_NilValue) { if (pO == R_NilValue) {
...@@ -332,7 +332,7 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO, ...@@ -332,7 +332,7 @@ SEXP SP_PREFIX(SpatialPolygons_c)(const SEXP pls, const SEXP pO,
pc++; pc++;
} else } else
ppO = pO; ppO = pO;
// SET_SLOT(ans, install("plotOrder"), NAMED(pO) ? duplicate(pO) : pO); // SET_SLOT(ans, install("plotOrder"), MAYBE_REFERENCED(pO) ? duplicate(pO) : pO);
SET_SLOT(ans, install("plotOrder"), ppO); SET_SLOT(ans, install("plotOrder"), ppO);
PROTECT(bbox = SP_PREFIX(bboxCalcR_c(pls))); pc++; PROTECT(bbox = SP_PREFIX(bboxCalcR_c(pls))); pc++;
...@@ -350,8 +350,8 @@ SEXP SP_PREFIX(SpatialPolygons_plotOrder_c)(const SEXP pls) { ...@@ -350,8 +350,8 @@ SEXP SP_PREFIX(SpatialPolygons_plotOrder_c)(const SEXP pls) {
int *po; int *po;
double *areas; double *areas;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
...@@ -416,8 +416,8 @@ SEXP SP_PREFIX(SpatialPolygons_getIDs_c)(const SEXP obj) { ...@@ -416,8 +416,8 @@ SEXP SP_PREFIX(SpatialPolygons_getIDs_c)(const SEXP obj) {
int i, n; int i, n;
SEXP pls, IDs, obj1; SEXP pls, IDs, obj1;
// PROTECT(obj1 = NAMED(obj) ? duplicate(obj) : obj); pc++; // PROTECT(obj1 = MAYBE_REFERENCED(obj) ? duplicate(obj) : obj); pc++;
if (NAMED(obj)) { if (MAYBE_REFERENCED(obj)) {
PROTECT(obj1 = duplicate(obj)); PROTECT(obj1 = duplicate(obj));
pc++; pc++;
} else } else
...@@ -442,8 +442,8 @@ SEXP SP_PREFIX(bboxCalcR_c)(const SEXP pls) { ...@@ -442,8 +442,8 @@ SEXP SP_PREFIX(bboxCalcR_c)(const SEXP pls) {
int i, j, k, n, npls, npl, pc=0; int i, j, k, n, npls, npl, pc=0;
double x, y; double x, y;
// PROTECT(pls1 = NAMED(pls) ? duplicate(pls) : pls); pc++; // PROTECT(pls1 = MAYBE_REFERENCED(pls) ? duplicate(pls) : pls); pc++;
if (NAMED(pls)) { if (MAYBE_REFERENCED(pls)) {
PROTECT(pls1 = duplicate(pls)); PROTECT(pls1 = duplicate(pls));
pc++; pc++;
} else } else
...@@ -559,8 +559,8 @@ SEXP SP_PREFIX(comment2comm)(const SEXP obj) { ...@@ -559,8 +559,8 @@ SEXP SP_PREFIX(comment2comm)(const SEXP obj) {
char s[15], *buf; char s[15], *buf;
int *c, *nss, *co, *coo; int *c, *nss, *co, *coo;
// PROTECT(obj1 = NAMED(obj) ? duplicate(obj) : obj); pc++; // PROTECT(obj1 = MAYBE_REFERENCED(obj) ? duplicate(obj) : obj); pc++;
if (NAMED(obj)) { if (MAYBE_REFERENCED(obj)) {
PROTECT(obj1 = duplicate(obj)); PROTECT(obj1 = duplicate(obj));
pc++; pc++;
} else } else
......
R version 3.2.2 (2015-08-14) -- "Fire Safety" R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit) Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY. R is free software and comes with ABSOLUTELY NO WARRANTY.
...@@ -292,7 +292,7 @@ SpatialPoints: ...@@ -292,7 +292,7 @@ SpatialPoints:
Coordinate Reference System (CRS) arguments: +init=epsg:28992 Coordinate Reference System (CRS) arguments: +init=epsg:28992
+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889
+k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs +units=m +no_defs
> dim(p[0]) > dim(p[0])
NULL NULL
...@@ -327,7 +327,7 @@ proj4string : ...@@ -327,7 +327,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
Grid attributes: Grid attributes:
cellcentre.offset cellsize cells.dim cellcentre.offset cellsize cells.dim
...@@ -350,7 +350,7 @@ proj4string : ...@@ -350,7 +350,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
Grid attributes: Grid attributes:
cellcentre.offset cellsize cells.dim cellcentre.offset cellsize cells.dim
...@@ -373,7 +373,7 @@ proj4string : ...@@ -373,7 +373,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
Grid attributes: Grid attributes:
cellcentre.offset cellsize cells.dim cellcentre.offset cellsize cells.dim
...@@ -397,7 +397,7 @@ proj4string : ...@@ -397,7 +397,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
> >
> # SpatialPolygonsDataFrame: > # SpatialPolygonsDataFrame:
...@@ -419,7 +419,7 @@ proj4string : ...@@ -419,7 +419,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
Data attributes: Data attributes:
something something
...@@ -437,7 +437,7 @@ proj4string : ...@@ -437,7 +437,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
> >
> # SpatialLines > # SpatialLines
...@@ -457,7 +457,7 @@ proj4string : ...@@ -457,7 +457,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
> >
> # SpatialLinesDataFrame > # SpatialLinesDataFrame
...@@ -479,7 +479,7 @@ proj4string : ...@@ -479,7 +479,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
Data attributes: Data attributes:
something something
...@@ -497,7 +497,7 @@ proj4string : ...@@ -497,7 +497,7 @@ proj4string :
[+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555 [+init=epsg:28992 +proj=sterea +lat_0=52.15616055555555
+lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000
+ellps=bessel +ellps=bessel
+towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725
+units=m +no_defs] +units=m +no_defs]
> >
> m = meuse > m = meuse
...@@ -622,4 +622,4 @@ Error in SpatialPointsDataFrame(pts, df, match.ID = TRUE) : ...@@ -622,4 +622,4 @@ Error in SpatialPointsDataFrame(pts, df, match.ID = TRUE) :
> >
> proc.time() > proc.time()
user system elapsed user system elapsed
0.889 0.324 0.889 0.900 0.276 0.869