wpgp / foot

An R package for processing building footprints
https://wpgp.github.io/foot/
GNU General Public License v3.0
29 stars 2 forks source link

add a restricted nearest neighbhour method #10

Open wcjochem opened 4 years ago

wcjochem commented 4 years ago

Consider adding a function to restrict nearest neigbhour distances to be calculalted within a spatial zone (e.g. admin unit). This can use the existing fs_NNdist and restrict the search objects ('Y') to within the zone (based on an intersection). This would involved repeated calls to the distance function for each spatial zone, which could be a bottleneck.

wcjochem commented 4 years ago

Note: as of v0.5 the NN index implemented during calculate_footstats/bigfoot now restricts neighbours to be within the spatial zone. The stand-alone function does not restrict by default.