Best method for finding the nearest parking lot

Hi, I am new to TomTom and map calculations in general. I’m looking for the best method to find the closest parking lot from a given Lat, Long position. I have a list of approximately 80 parking lots and there matching Lat, Longs.

I want to find the closest parking lot by driving distance. (I do not need to provide the directions.) What would be the best approach to solving this problem? Is this a job for “Batch Routing”?

I can pair down the list of 80 lots prior to submitting to TomTom using a simple nearest neighbor method (Euclidean, Manhattan, or Haversine distance). I’m guessing that pairing down the list using this method would save time. But I’m not sure what would be a good number of candidate lots to send?

I also wanted to note that this is going to be a real-time request, so I am looking to get the response as quickly as possible and would be willing to tolerate some degree of error in the selected lot.

I would appreciate any advice folks could give on this subject.


1 Like

Hello Daniel, welcome to the forum!

You have already a good approach : Indeed the Batch Routing would be something I’d use. All other calculations that you mentioned ( Haversine, Euclidean etc ) are not accurate enough if your objective is to direct people through streets.

Note that you only need to get the summary of the route, which contains the total length and ETAs as specified here.
With this parameter :

Let us know if you need more help with this!

1 Like

Thanks, Jose!

The Batch Routing worked out great and is definitely fast enough for my needs.

I use the nearest neighbor method to pair down the list from 80 parking lots to the closest five. Then I call TomTom with this sublist of five to find the overall closest driving distance.

This method is currently working well.

Thanks again, I appreciate the insights!