openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
653 stars 384 forks source link

Maps / madenearme don't display when some Swiss products with empty geo codes are in the results set #781

Open stephanegigandet opened 7 years ago

stephanegigandet commented 7 years ago

What

Made Near Me and C'est emballé près de chez vous currently do not display the map, as there is an issue with some Swiss products that have an empty geo field:

{ product_name:"Saucisses de porc", brands:"coop,naturafarm,bell", url: "https://fr.openfoodfacts.org/produit/7610809084144", img:'<img src="https://static.openfoodfacts.org/images/products/761/080/908/4144/front_fr.3.100.jpg" width="75" height="100" srcset="https://static.openfoodfacts.org/images/products/761/080/908/4144/front_fr.3.200.jpg 2x" alt="Saucisses de porc - Produit" /> ', origins:'Origines des ingrédients : Suisse<br/>', geo:[,]},
stephanegigandet commented 7 years ago

https://fr.openfoodfacts.org/code-emballeur/ch-336

Some encoding issue and missing space in the address:

Bell Schweiz AG, Els\x8Asserstrasse174, 4056, Switzerland

There are a dozen of products with similar issues.

/home/off/packager-codes# grep "CH 336" CH-merge-UTF-8.csv CH 336;47,5742147;7,5751269;336;41600856;Bell Schweiz AG;Els▒sserstrasse174;Bell Schweiz AG, Els▒sserstrasse174, 4056, Switzerland ;4056;4056 BS;MP;PP(VI), PP(X);A, B, C, L, O, P, S, fG, wU; CH 336;47,5742147;7,5751269;336;41600856;Bell Schweiz AG;Els▒sserstrasse174;Bell Schweiz AG, Els▒sserstrasse174, 4056, Switzerland ;4056;4056 BS;PP;MP(V), PP(X);A, B, C, L, O, P, S, fG, wU;bl CH 336;;;336;41600856;Bell Schweiz AG;Els▒sserstrasse174;Bell Schweiz AG, Els▒sserstrasse174, 4056, Switzerland ;4056;4056 BS;PP;MP(V), PP(VI);A;

There are 3 entries for "CH 336", and the last one does not have coordinates.

teolemon commented 4 years ago

@stephanegigandet this seems fixed image