sdswr
sdswr copied to clipboard
Programming challenges
- building on the
sfpackage, write a function that for p features, givenn, finds thennearest features and returns their index as a list with integer vectors. A brute-force method would first compute the complete distance matrix usingst_distance; a smarter method avoids storing the full matrix by iterating over the features, a really smart method uses a spatial index to avoid having to compute all distances. See also https://github.com/edzer/sfr/issues/76 - ideas and wishes from several people are mentioned here and in links found there
Create a function that plots an sf object automatically over a google map or OSM background; see e.g.
https://github.com/dkahle/ggmap/pull/162
and argument bgMap in sf:::plot_sf.