Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 ;)
Comment | File | Size | Author |
---|---|---|---|
#15 | Location_zipcodes_mx.patch | 8.45 MB | Yurii Krysiuk |
#8 | zipcodes.mx_.mysql_.txt | 3 MB | jackbravo |
#5 | zipcodes.mx_.mysql_.gz | 330.4 KB | jackbravo |
#5 | zipcodes.mx_.mysql_.txt | 3 MB | jackbravo |
#1 | zipcodes.mx_.mysql_.txt | 62.85 KB | greggles |
Comments
Comment #1
gregglesBummer. 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.
Comment #2
jackbravo CreditAttribution: jackbravo commentedHi 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?
Comment #3
gregglesI 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?
Comment #4
gregglesA better status.
Comment #5
jackbravo CreditAttribution: jackbravo commentedOk. 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.
Comment #6
gregglesI think it should be one insert per row instead of multi-insert.
Also, it's missing the Viva México :)
Comment #7
jackbravo CreditAttribution: jackbravo commentedThe 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.
Comment #8
jackbravo CreditAttribution: jackbravo commentedUps! Now really added =P.
Comment #9
gregglesOK. I'm not sure if the multi-insert is as compatible across databases but I agree the file size savings is worth something.
Comment #10
jackbravo CreditAttribution: jackbravo commentedThat'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.
On the other hand, on sqlite it is not supported. http://www.sqlite.org/lang_insert.html =(.
Comment #11
podarokpostponed before tests fix
#1931088: [META] Fixing tests
Comment #12
podaroktests fixed #1931088: [META] Fixing tests
lets go
Please. do provide a patch against latest dev for review
Comment #13
podaroklatest version tag
Comment #13.0
podarokUpdated issue summary.
Comment #14
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedComment #15
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedCreated patch file with zip codes for Mexico
Comment #16
Yurii Krysiuk CreditAttribution: Yurii Krysiuk commentedComment #17
podarokthanks, commited
Comment #19
jackbravo CreditAttribution: jackbravo commentedThe patch by Yuriy Krysiuk contains zipcodes for australia not mexico.
Comment #20
Maxis CreditAttribution: Maxis commented