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

9
  • Which QGIS version is it? When you try with OSM/Nominatim, do you get the same empty result? If a script is also an option for you then you may try the solution offered by @ThomasG77. BTW, GeoPy works also good (55.6953476, 13.2389866), so you can pregeocode your CSV with addresses before importing them into QGIS. Moreover, you may also be interested in third party Python packages inside the QGIS, for more details check this thread.
    – Taras
    May 16 at 16:55
  • Well, it appears that script is the way to go. I have no knowledge of script unfortunately. May 19 at 18:33
  • Did you try what @Babel or I offered?
    – Taras
    May 19 at 19:32
  • 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. May 20 at 16:19
  • 1
    Can you share your data with me/us? I would like to help you more
    – Taras
    May 21 at 18:36
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. May 19 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
    May 19 at 19:12
  • I did. Se my response to his/her suggestions. May 21 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
    May 17 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
    May 17 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, privacy policy and cookie policy

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