Skip to content

Commit

Permalink
correct knearneigh superfluous warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Apr 20, 2024
1 parent 97ca382 commit 22f6f5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Version 1.3-4 (development)

* remove spurious warning in `knearneigh` for longlat geometries

* fix https://github.com/edzer/sdsr/issues/121, wrong assignment of old test names in `lmRStests`

* fix #144 in `plot.nb` and `nb2lines`
Expand Down
2 changes: 1 addition & 1 deletion R/knearneigh.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ knearneigh <- function(x, k=1, longlat=NULL, use_kd_tree=TRUE)
# https://github.com/r-spatial/spdep/issues/38
zd <- any(duplicated(x)) #zerodist(SpatialPoints(x))
# kNN() handles duplicate points
if (zd) {
if (zd && !use_s2_ll) {
warning("knearneigh: identical points found")
if (use_kd_tree) {
warning("knearneigh: kd_tree not available for identical points")
Expand Down

0 comments on commit 22f6f5f

Please sign in to comment.