PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Dec 08, 2019 8:37 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Oct 20, 2014 8:37 am 
Offline
Forum Newbie

Joined: Mon Oct 20, 2014 8:04 am
Posts: 2
Hi guys;

As part of a project I need to design some sort of algorithm which will search the closest match (Destination), however I am unsure as to what data I need and which specific algorithms or code will be needed.


Top
 Profile  
 
PostPosted: Mon Oct 20, 2014 11:26 am 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
"Destination" isn't a data type, so it's hard to help. Is that a set of lat/long co-ordinates? Street address? Cartesian co-ordinates?

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Sun Nov 02, 2014 2:17 pm 
Offline
Forum Newbie

Joined: Mon Oct 20, 2014 8:04 am
Posts: 2
I am creating a system which will help users find local business for certain categories. In the sign up page the users must enter in there full address which includes House number/address, city, town and postcode. So I need to creae/find an algorithm that will use these details to find the most local business.


Top
 Profile  
 
PostPosted: Sun Nov 02, 2014 4:34 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
You could create a bounding box and then use the Haversine formula on results inside that box.

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group