Caiyun Weather Geo Query Optimization (1): Meteorological Station Data Query
This article is reproduced from “Caiyun Weather Geo Query Optimization: The nearest N points” Let’s start from a real-world scenario: How to find the K nearest national observation stations to the 768 Creative Industry Park in Haidian District, Beijing? The simplest approach is to iterate over all candidate stations, compute the distance between each station and the 768 park, and then pick the K smallest distances. The code is straightforward. But the problem is it is slow. ...