Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
4 May 2010 at 13:22 UTC
Updated:
16 Nov 2012 at 10:18 UTC
Attached is a patch to enable access to UK postcodes in the zipcodes table. It adds code to supported/location.uk.inc and was made against current dev.
It provides the following functions:
location_latlon_rough_uk()
location_get_postalcode_data_uk()
These are modelled on their US equivalents and tested with an experimental argument handler, see #606342: Views Argument Handler for Proximity
Although the UK records in zipcodes table contain no city or state information, the latitude and longitudes are there.
| Comment | File | Size | Author |
|---|---|---|---|
| location.uk_.inc-enable-uk-postcodes.patch | 3.41 KB | hutch |
Comments
Comment #1
yesct commentedI think some comments are longer than 80 chars.
Powered by Dreditor.
(testing out using Dreditor... sorry about the non useful review. :) still needs to be reviewed more. )
Comment #2
hutch commentedAll the comments in this patch were copied over verbatim from existing code, in this case location.us.inc
What needs reviewing is the functionality, cleanups later. I usually run the Code review module over my modules just before a stable release, Location needs bugfixes before anything else.
The patch in #578216: proximity filter wont work with german zips, the error is the missing location_latlon_rough_de() may have some bearing on this functionality. If geocode lookups provide better data than currently available in location.uk.inc then that must be considered although there may be performance issues. I shall be looking into this ASAP
It may also be possible to use geocoding to improve the existing zipcodes entries, not sure if the data can be captured in the case of UK. Lots of interesting possibilities.
Comment #3
yesct commentedyep. :) I agree.
Comment #4
hutch commentedLooks like #662892: (1=0) in query and Reworking of proximity filter handler to automatically geocode zipcodes are working on this already, just found the thread ;-)
Comment #5
yesct commentedshould we mark this a duplicate and put a link in the other issue to this one (you understand the details better about the two)?
Comment #6
hutch commentedThey are not so much duplicate as parallel, I'm currently exploring #662892: (1=0) in query and Reworking of proximity filter handler to automatically geocode zipcodes patches in #28, they look promising. Folks want to do proximity searches based on input of city name, that's what I'm trying to pull together in conjunction with other useful ways.
Comment #7
ankur commentedI guessing this was closed in another ticket. If that is not the case, please feel free to re-open this ticket.
Comment #8
manoloka commentedIs this patch still needed nowadays???
Cause I'm having problems with this, all seems to work execpt that the list doesn't actually gets ordered by distance/proximity at all.
If I set a filter everything works as expected but with an argument the order seems random.