Nearest-neighbor estimation in sensor networks