[R-sig-Geo] autoKrige: singular matrix in function LDLfactor

Edzer Pebesma edzer.pebesma at uni-muenster.de
Sun Aug 11 21:33:35 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zerodist and zerodist2 give wrong results when data are longlat;
please try using sp from r-forge for this; see
https://r-forge.r-project.org/R/?group_id=1014

On 08/07/2013 09:41 AM, ElenaC wrote:
> Thanks Jesse,
> 
> the issue does indeed seem to be a malfunctioning of zerodist2().
> The first time I tried, when I got no matches, both SpatialPoints
> objects were projected, with proj4string of "+proj=merc
> +ellps=WGS84".
> 
> I have now tried again with the same data but unprojected
> (proj4string of "+proj=longlat +ellps=WGS84"), and I am getting
> over 10,000 matches. But the output still doesn't make any sense!
> (What I understand the function is meant to do is find indexes in
> both objects with matching coordinates, but it is not doing that):
> 
> 
>> match <- zerodist2(HG1990,center_points) dim(match)
> [1] 13478     2
>> 
>> match[1,]
> [1]  2840 51188
>> 
>> coordinates(HG1990[2840,])
> coords.x1 coords.x2 [1,]        48        48
>> coordinates(center_points[51188,])
> coords_lon2 coords_lat2 [1,]      42.125      42.125
> 
> The coordinates above certainly do not match (in fact there is not
> a single pair of matching coordinates out of the over 13,000 rows
> returned by zerodist2). Would this be a bug or am I interpreting
> the output incorrectly?
> 
> These are the library versions I am using:
> 
>> sessionInfo()
> R version 3.0.1 (2013-05-16) Platform: x86_64-apple-darwin10.8.0
> (64-bit)
> 
> locale: [1]
> en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
> 
> attached base packages: [1] stats     graphics  grDevices utils
> datasets  methods   base
> 
> other attached packages: [1] automap_1.0-12 gstat_1.0-16
> ncdf_1.6.6     rgdal_0.8-10   sp_1.0-11
> 
> loaded via a namespace (and not attached): [1] grid_3.0.1
> intervals_0.14.0 lattice_0.20-15  spacetime_1.0-5 tools_3.0.1
> xts_0.9-5        zoo_1.7-10
> 
> 
> 
> -- View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/autoKrige-singular-matrix-in-function-LDLfactor-tp7584343p7584363.html
>
> 
Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________ R-sig-Geo mailing
> list R-sig-Geo at r-project.org 
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

- -- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSB+cPAAoJEM1OCHCtOnfx6+4H/jNw39dEBTUAcfl+hDUJVBbB
1yogGGr0HeaZ8qkFVJ/Q/bNNAW1LWZX0FAkx9WsFJ/TNIsILTZe1o9YE3G6vjc55
g5WdnCpoi5yRoKx/AO916YEaEXZ5LRdFjCwfvePwg04Ky9LSiRyhp3VeuQVmoGCo
L5Ep+qM1A7FaavBT3GQX5yx/TBAj9sfa8y3zAetJEDLTJYwgQdBK91g8a/GeG/oR
BfwlmpYXnvVN6TfnBLnwk2tijYSKRTbQRpL4bJqiucO/mwVP7OPx2Y9hn1DXi8+2
uLIwb9lZCc7ja4VJZmijWabkhDcGh56ilawDu5Np+PjFWKnWyZMqHzzhGt6MFQQ=
=e1zL
-----END PGP SIGNATURE-----



More information about the R-sig-Geo mailing list