Posted by juicytoo on September 2, 2009 at 10:29pm
| Project: | Location |
| Version: | 6.x-3.x-dev |
| Component: | Data update |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Hi,
I'm not sure if its just me.
But according to the zipcode..mysql files
the coordinates are listed in this order:
- longitude
- latitude.
But the schema seems to list them as:
- latitude
- longitude.
ie. the latitude and longitude needs to swap places for proximity search to work properly.
Can someone confirm this analysis is correct?
cheers
Comments
#1
I used this mysql query :
UPDATE zipcodes SET latitude =(@temp:=latitude), latitude = longitude, longitude = @temp#2
Same here for zipcodes.be.sql.
juicytoo's trick worked perfectly to solve this.
I think we could go two ways with this:
1. change all the zipcodes in the SQL and make sure the data matches the correct columns
2. be lazy and just add juicytoo's query to the end of the affected sql files.
I'd go for 1. Should be doable with a bit of regex magic.
#3
Here is the good file.
#4
I remember a recent issue about this... Please check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.
#5
This has been fixed in #830352: postcode database files for au & be have lat/lon reversed.
#6
Thank you Pol !