Shaun Walbridge
GIS Developer
On 8/24/15, 4:43 AM, "R-sig-Geo on behalf of Marc Mar? Dell'Olmo"
<r-sig-geo-bounces at r-project.org on behalf of marceivissa at gmail.com> wrote:
>Dear all,
>
>I'm trying to geocode addresses (of Catalonia) with accents and
>Catalan characters (as for example "?"). I'm using the "geocode"
>function (package ggmap), but I obtain some Google "INVALID_REQUEST"
>when the addresses have these characters. For example:
>
>> geocode("Carrer Vene?uela, 10, 08019 Barcelona, Spain")
>Information from URL :
>http://maps.googleapis.com/maps/api/geocode/json?address=Carrer+Vene%E7uel
>a,+10,+08019+Barcelona,+Spain&sensor=false
> lon lat
>1 NA NA
>Warning message:
>geocode failed with status INVALID_REQUEST, location =
>"Carrer+Vene?uela,+10,+08019+Barcelona,+Spain"
>
>
>> geocode("Carrer Mec?nica, 12, 08038 Barcelona, Spain")
>Information from URL :
>http://maps.googleapis.com/maps/api/geocode/json?address=Carrer+Mec%E0nica
>,+12,+08038+Barcelona,+Spain&sensor=false
> lon lat
>1 NA NA
>Warning message:
>geocode failed with status INVALID_REQUEST, location =
>"Carrer+Mec?nica,+12,+08038+Barcelona,+Spain"
>
>However, I can find these addresses directly on Google maps.
>
>https://www.google.es/maps/place/Carrer+de+Vene%C3%A7uela,+10,+08019+Barce
>lona/@41.40873,2.2057253,17z/data=!3m1!4b1!4m2!3m1!1s0x12a4a347b9b9bb8d:0x
>41b696acd7b26e37
>
>https://www.google.es/maps/place/Carrer+de+la+Mec%C3%A0nica,+12,+08038+Bar
>celona/@41.3591918,2.1379927,17z/data=!3m1!4b1!4m2!3m1!1s0x12a498a25156dc8
>b:0xc9ccfd74e54c503f
>
>
>I think that there is a problem enconding the URL. I hope anyone can
>help me! Thank you very much!
>
>
>Marc
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo