michaeldrennen / Geonames

A Laravel (php) package to interface with the geo-location services at geonames.org.
MIT License
89 stars 38 forks source link

Geonames updates - Alternate names ? #45

Closed Nuranto closed 3 years ago

Nuranto commented 4 years ago

It seems there is no update for the table geonames_alternate_names, am I right ? It is quite an important table since this is where the postcode are.

Nuranto commented 4 years ago

After some research, it seems my issue is not linked to a lack of update (even if it is still a thing) I was looking for postal code of "Le Lignon" in Switzerland (which should be 1219). However I cannot find it in file http://download.geonames.org/export/dump/alternatenames/CH.zip even it shows 1219 in https://www.geonames.org/postalcode-search.html?q=Le+Lignon&country=CH

What am I missing here ? Are the data from http://download.geonames.org/export/dump/ not complete or up to date ?

karlshea commented 4 years ago

Check out my PR #42, it adds the dedicated postal code table. I checked in my import and '1219' maps to "Le Lignon, Genève, CH"

Nuranto commented 4 years ago

Oh, seems perfect ! I wasn't aware of such data, I always thought it was stored in alternate names! Thank you @karlshea! @michaeldrennen You think that can be merged on master ?

michaeldrennen commented 3 years ago

@karlshea Left a question for you in the PR.

Nuranto commented 3 years ago

@karlshea @michaeldrennen There's an issue with this. I think it lacks of some encoding conversion or something ?

Example (postal_code = 94430) :

Capture d’écran 2021-06-19 à 16 18 52
Nuranto commented 3 years ago

It works if i add CHARACTER SET UTF8 in the LOAD DATA LOCAL INFILE query... It's strange, i don't have the issue with other geonames tables