Station List and finding the station closest to coordinates #619
-
I am using the API to get the current temp and conditions by using the browser's location. I pass the coordinates to get the observationStations. Then I choose the first station on the list to get obervations/latest. How is the observationStations list indexed? Is it in order of closest to the coordinates or is it random? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I came here to ask the exact same question. I was wondering if I have to do some type of euclidean distance to see which one is the closest or if it was already ordered closest to furthest. |
Beta Was this translation helpful? Give feedback.
-
Checking for my gridpoint, the list of stations in the /gridpoints/{wfo}/{x},{y}/stations call are returned in order of increasing distance from the gridpoint. |
Beta Was this translation helpful? Give feedback.
-
Sorry there was not an earlier answer to this. That is correct. It is in
order of nearest to farthest.
…On Mon, Oct 30, 2023, 10:21 AM J.F. ***@***.***> wrote:
So it is confirmed that the first station on the list at index is 0 is the
closest and that the list is sorted from nearest to farthest.
I will go ahead and accept it as the answer.
Thanks!
—
Reply to this email directly, view it on GitHub
<#619 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFQSTVCYR2HHEULPKJIUT3YB7AWPAVCNFSM6AAAAAAVXSHZKCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TIMRVGQZDS>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Checking for my gridpoint, the list of stations in the /gridpoints/{wfo}/{x},{y}/stations call are returned in order of increasing distance from the gridpoint.