This issue is part of meta issue #1931088: [META] Fixing tests

Along with #855898: Load mexico zipcode data from the zipcode table we can get some first class support for Mexico in the location module.

The attached file is based on data from Wikipedia and a geocoding service. I believe it is at least as accurate as the US data ;)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

FileSize
62.85 KB

Bummer. A lot of these had lat/lon of zero when they actually should have contained data.

Attached is an updated file that is much better.

jackbravo’s picture

Hi greggles. Your table is missing a few zipcodes =P. I do like the Viva México statement =).

Here is a table with more zipcodes. Data taken from http://www.geonames.org/

Hmmmmm. tried uploading the file but it is too big. Gzipped is 3MB. How can I add it to this issue?

greggles’s picture

I realized after the fact it's missing things. I just based it on Wikipedia, but that's obviously not complete.

Maybe you could break it apart into multiple files?

greggles’s picture

Status: Needs review » Needs work

A better status.

jackbravo’s picture

Status: Needs work » Needs review
FileSize
3 MB
330.4 KB

Ok. I think I was using the wrong file. Gzipped it does fit. Unzipped it is 3 MB just like the US zipcodes file. And it does fit, maybe my connection was wrong and that's why it failed. Anyway.

here it is.

greggles’s picture

I think it should be one insert per row instead of multi-insert.

Also, it's missing the Viva México :)

jackbravo’s picture

The multivalue insert allowed me to reduce the size of the file from 4MB to 3. And it is also how I see the current zipcodes.xx.mysql files are structured. Any specific reason why it should be one insert per row?

As for the Viva México, you are right!!! Totally forgot =)
added.

jackbravo’s picture

Ups! Now really added =P.

greggles’s picture

Status: Needs review » Reviewed & tested by the community

OK. I'm not sure if the multi-insert is as compatible across databases but I agree the file size savings is worth something.

jackbravo’s picture

That's a good question. I looked into postgres, and seems like it is compatible http://www.postgresql.org/docs/8.2/interactive/sql-insert.html.

INSERT INTO films (code, title, did, date_prod, kind) VALUES
    ('B6717', 'Tampopo', 110, '1985-02-10', 'Comedy'),
    ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');

On the other hand, on sqlite it is not supported. http://www.sqlite.org/lang_insert.html =(.

podarok’s picture

Status: Reviewed & tested by the community » Postponed

postponed before tests fix
#1931088: [META] Fixing tests

podarok’s picture

Status: Postponed » Needs review

tests fixed #1931088: [META] Fixing tests
lets go

Please. do provide a patch against latest dev for review

podarok’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

latest version tag

podarok’s picture

Issue summary: View changes

Updated issue summary.

Yurii Krysiuk’s picture

Assigned: Unassigned » Yurii Krysiuk
Issue summary: View changes
Yurii Krysiuk’s picture

Status: Needs work » Needs review
FileSize
8.45 MB

Created patch file with zip codes for Mexico

Yurii Krysiuk’s picture

Assigned: Yurii Krysiuk » Unassigned
podarok’s picture

Status: Needs review » Fixed

thanks, commited

  • podarok committed 28c9243 on 7.x-3.x authored by Yuriy Krysiuk
    Issue #874126 by Yuriy Krysiuk, jackbravo, greggles: provide zipcodes...
jackbravo’s picture

Status: Fixed » Needs work

The patch by Yuriy Krysiuk contains zipcodes for australia not mexico.

Maxis’s picture

Assigned: Unassigned » Maxis