6

I am trying to geocode an address in QGIS. I am aware of the MMQGIS Plugin and I have been trying to use that.

The dialogue window appears as though it is catered to US addresses as it contains a column for "State". The address that I want to geocode is Swedish. The CSV file in which I have the address is formatted in UTF-8. I also have the Google API Key.

When the geocoding is done a new layer is added in the panel but it doesn't contain any information and nothing appears on the map. You can see some screenshots below.

A CSV file: enter image description here

My empty result after Geocoding: enter image description here

7
  • Well, it appears that script is the way to go. I have no knowledge of script unfortunately. Commented May 19, 2021 at 18:33
  • I did try using OSM but it produced a point in France instead of Sweden. I thought i had to do with wrong CRS but when I changed it the point appeared in the Atlantic ocean instead. Same result with replacing ä, ö, å with Latin equivalents. Commented May 20, 2021 at 16:19
  • Free of charge.. Hm.. what an immature attitude towards helping someone. If you are willing to help for free then do not charge your assistance with so much malice. The Google alternative doesn't work. Must be something wrong with my API-key. Thanks for the free example. – Commented May 21, 2021 at 18:26
  • Sorry I meant that Google (since you have an api key) quality is probably much better than OSM...I don’t have access to Google, so I could help only with OSM Data. Sorry for confusing!
    – Taras
    Commented May 21, 2021 at 18:27
  • It's ok. Thanks for your help! Commented May 21, 2021 at 18:33

3 Answers 3

4

This is a limitation of the plugin. It accepts ASCII characters only. Try changing special characters by it's nearest ASCII equivalent: ä by a etc. Otherwise, use another Geocoding method.

See here for details:

https://gis.stackexchange.com/a/382550/88814

3
  • I tried it. It gives me coordinates and creates a point-layer but it ends up in France... and the attribute table shows some other address (at least the same city though) than the one I imported. Commented May 19, 2021 at 19:04
  • Ok, so try ANSI: @Taras solution. If that doesn't work, either, I guess you have to use another method. As stated: encoding of special characters is a limitation of the plugin
    – Babel
    Commented May 19, 2021 at 19:12
  • I did. Se my response to his/her suggestions. Commented May 21, 2021 at 18:19
4

Sounds silly but if you work on Windows you may try using the ANSI encoding (I know that UTF-8 should be used), see the image below

result

For more details, please check What is ANSI format?.


As @Babel suggested, I also tried using ANSI encoding with other addresses that possess Latin and special Latin characters. They were successfully geocoded with MMQGIS, please see the image below.

result2

Unfortunately, it did not work with non-Latin characters.

They can be encoded in UTF-8, viewed in Notepad++ but not geocoded in MMQGIS. no_result_utf

They could not be encoded in ANSI, some details were described in this comment. no_result_ansi


References:

2
  • Thanks, @Taras - to be sure: saving non-latin characters correctly is possible with UTF-8, but not with ANSI (your screenshots), but geocoding with MMQGIS fails in both cases, right? So to say: The plugin works 1. With UTF-8: ASCII only, 2. With ANSI: ASCII plus special characters of the latin alphabet 3. With either encoding for non-latin alphabets - is that correct? So for non-latin scripts, at the moment there seems to be no way to geocode them with MMQGIS, correct?
    – Babel
    Commented May 17, 2021 at 6:30
  • 1
    1. Plugin works with ANSI only when they are Latin and special Latin characters. 2. Non-Latin can not be encoded in ANSI. Other cases were not investigated.
    – Taras
    Commented May 17, 2021 at 6:47
0

Did you try to use the OSM-Geocoding? Otherwise the fault is likely to be in the Formatting of the CSV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.