+ Reply to Thread
Results 1 to 8 of 8

Selecting the nearest static location (weather station) for a list of GPS tracker points

  1. #1
    Registered User
    Join Date
    01-16-2023
    Location
    Gibraltar
    MS-Off Ver
    2016
    Posts
    4

    Selecting the nearest static location (weather station) for a list of GPS tracker points

    Hi there. First time poster here, hoping someone can help!

    I'm working with large datasets of GPS tracks (latitude & longitude) and I am having to calculate the distance (km) between each location and the previous point in the track, which I've done using the following formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Where column O is latitude and P is longitude and this seems to work just fine.

    I now need to:
    1. also calculate distances between each location from the GPS tracks and a few static locations (weather stations), which I have in a separate table; AND
    2. select the closest weather station and display the associated weather variables (min/max temp, wind speed/direction, rain, etc.) for that particular date/time from the table.

    I'm sure there must be a neat way of doing this with a single formula, but this is where I'm stuck!

    I can provide sample data if necessary but I've basically got lists of latitude and longitude for the GPS tracks at certain time/date intervals and separate lists of hourly weather data at fixed locations.


    Any help would be very appreciated, thanks!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    It would help if you attached a sample Excel workbook which shows your data layout and in which you can show manually what you want to achieve.

    To do this, follow the instructions in the yellow banner near the top of the screen.

    Pete

  3. #3
    Registered User
    Join Date
    01-16-2023
    Location
    Gibraltar
    MS-Off Ver
    2016
    Posts
    4

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    Hi Pete

    I'm attaching the sample workbook as requested.

    The first sheet contains the GPS tracking data and I want the cells G3:Q12 to be filled using that data and the weather data from the other sheets.
    G3 should show the name of the nearest weather station to C3:D3. Then based on that and the date/time the relevant weather data should then be displayed in the subsequent columns.

    I hope that's a little clearer with the attached file.


    Thanks again,
    Ty
    Attached Files Attached Files

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,410

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    One way:

    Create a sheet with the coordinates of the Weather stations and try in G3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in H3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in I3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in J3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 01-19-2023 at 12:34 AM.

  5. #5
    Registered User
    Join Date
    01-16-2023
    Location
    Gibraltar
    MS-Off Ver
    2016
    Posts
    4

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    Quote Originally Posted by HansDouwe View Post
    One way:

    Create a sheet with the coordinates of the Weather stations and try in G3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in H3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in I3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    try in J3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi Hans

    This is very helpful as it clearly works!
    However, would you mind adding an explanation as to how the formulas in G3 and J3 work please, as I am not familiar with the INDEX, INDIRECT and MATCH functions?


    Many thanks again!

  6. #6
    Registered User
    Join Date
    01-16-2023
    Location
    Gibraltar
    MS-Off Ver
    2016
    Posts
    4

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    Could someone help by explaining this please?


    Thanks

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,410

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    Function in column J uses INDIRECT and column G for looking in the correct sheet.
    And MATCH(H3+I3,.... is for looking in de correct row.

    Function in colomn G is looking for the neaerest weather station. It's using the part of the formula until the ACOS is taken. How bigger that number (how closer to 1) how smaller the distance.
    First it creates the results for all wheather stations and then the formula is looking for the place with the max result (= smallest distance).

  8. #8
    Registered User
    Join Date
    01-26-2023
    Location
    London, England
    MS-Off Ver
    10
    Posts
    2

    Re: Selecting the nearest static location (weather station) for a list of GPS tracker poin

    Thanks a lot

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Date as header, filter names and make a list for work location tracker
    By akhileshgs in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-25-2021, 10:14 AM
  2. [SOLVED] Finding the nearest location from list of latitude Longitude
    By spike4848 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2019, 11:45 PM
  3. [SOLVED] Rolling Points off Error Tracker
    By PJ_Bourne in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2018, 08:48 PM
  4. attendance tracker that can calculate points
    By dragon00235 in forum Excel General
    Replies: 1
    Last Post: 03-12-2017, 03:52 AM
  5. Attendance Tracker Where Points Drop Off
    By kwood41799 in forum Excel General
    Replies: 8
    Last Post: 05-04-2015, 04:46 PM
  6. Weight Watchers Points Tracker
    By kgkev in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-15-2008, 10:59 AM
  7. [SOLVED] Selecting nearest under in a list
    By Purfleet in forum Excel General
    Replies: 3
    Last Post: 04-19-2005, 11:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1