I have long / lat coordinates with height in a SQLite database.
Some sample data:
latitude longitude altitude ------------------------------ 48.003333 11.0 652 48.036667 11.000833 651 48.280833 11.000833 533
Now I want some SQL query that will give me the maximum height for the given latitude / longitude coordinates, e.g.
Provided that long / long will be 48.023445 / 11.000733 , so the nearest height is 651 with wide / long 48.036667 / 11.000833 . Tried to search many forums, but nothing useful. Examples of a single variable or very slow queries are given everywhere. I need this query very quickly, and we saw some solution based on UNIONS. I need this fast because I will make about 1.5 million queries on this table. I use transactions and indexing.
source share