I'm using zipcodes.de.mysql which is shipped by the location module
I was wondered why all my locations entered were not shown on the map (or on the false place)
So I investigated the problem and read the comments at this mysql-file
but as I saw the comments do not fit in any way to the data provided
But the major problem is that the the long and lat cols are shifted!
INSERT INTO zipcodes VALUES ('81927','München','BY','11.637324','48.160068',1,1,'de');
compared with the table scheme:
CREATE TABLE zipcodes (
zip varchar(16) NOT NULL default '0',
city varchar(30) NOT NULL default '',
state varchar(30) NOT NULL default '',
latitude decimal(10,6) NOT NULL default '0.000000',
longitude decimal(10,6) NOT NULL default '0.000000',
timezone tinyint(2) NOT NULL default '0',
dst tinyint(1) NOT NULL default '0',
country char(2) default '',
PRIMARY KEY (zip),
KEY pc (country, zip),
KEY zip (zip),
KEY latitude (latitude),
KEY longitude (longitude),
KEY country (country)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
this means 48.160068 is the value for the longitude which is not correct because this is the latitude!
compared this with the coordinates provided by wikipedia:
(see right box) http://en.wikipedia.org/wiki/Munich
I hope someone is able to regenerate this table in a proper way...
btw: phpmyadmin tells a lot of errors if you look at the table definitons
index set more than once to a specific column and this column is a primary key at the same time (I'm talking about zip)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | zipcode_fix.patch.txt | 1.3 KB | Tobias Maier |
| #1 | zipcodes.de_0.mysql | 740.06 KB | Tobias Maier |
Comments
Comment #1
Tobias Maier commentedit is much shorter if I just attach the new zipcode.de.mysql-file
than to diff this file (because no line is the same anymore)
Comment #2
Tobias Maier commentedand here comes a patch-file for the install-file.
please remove the following files to be consistent:
location.mysql
database/zipcodes.mysql
I dont know if this is needed: location_upgrade.php
Comment #3
geodaniel commentedI posted a patch for this back in November as well, but I guess it never made it into the module... we should really get this in as it affects a whole country badly.
Comment #4
ankur commentedFixed in HEAD and DRUPAL-4-7
Comment #5
geodaniel commentedThanks Ankur
Comment #6
(not verified) commented