Reputation: 75
I am using google geocoding API (via PHP) to turn addresses into co-ordinates, when project complete will be dealing with an automated export of 100-150 data points a day, this will then be turned into a heat map.
The problem I have is the address entries will range from computer assisted (postcode lookup) to manual entries with limited information e.g. "oxford street london". With these type of entries google will return co-ordinates of the middle of Oxford Street, which for a heat map is going to skew results. I am stuck trying to find an automated method of removing these.
Oxford Street is an example - could be any london road, so ignoring a specific set of co-ordinates wont work.
Can't ignore addresses without a house number in as "selfridges oxford street" would geocode correctly and need to be kept in.
Any ideas?
Upvotes: 1
Views: 57
Reputation: 75
Have found what I was looking for...
Using Json ($res is returned array) $res['results'][0]['types'] gives the type of address coming back (e.g. "street address", "poi", etc..) putting in just a street comes back as "route" so ignoring those should then remove the ones without a specific building attached.
Upvotes: 1