How to format Adress?


#1

I use ors to find the distance between two positions. That works geat bit there is a little problem.

If I search for a street in “66130 Saarbrücken” I become a street in “Saarbrücken” but 66130 is “Fechingen”. If I try it in Google Maps I become the right position.

Is there a way to fix this problem?


#2

Hi @hirnfrei
Could you please provide an exact example for the problem? I am not going to try each street in Saarbrücken until i find the one that is not working :wink:

In general it is good to formulate your search request from small to large e.g.:
mainstreet 2 66130 Saarbrücken (which actually gives a street in Eschringen)

regards


#3

Try

Provinzial Str. 35, 66130 Saarbrücken

The street is in 66130 Fechingen and if I search with 66130 Fechingen I become the right coordinates!


#4

I think it’s because of the Str.
try Provinzialstraß(or ss)e 35 66130 Saarbrücken. It should give the correct result


#5

Hmm. I only become streets in Saarbrücken. But I will try it again.

Only search for

Provinzialstraße 35 66130 Saarbrücken


#6

http://maps.openrouteservice.org/directions?n1=49.203705&n2=7.067685&n3=15&a=49.201651,7.062285,null,null&b=0&c=0&k1=en-US&k2=km

is the same result as
https://www.google.com/maps/place/Provinzialstraße+35,+66130+Saarbrücken/@49.2051353,7.0571975,13.11z/data=!4m5!3m4!1s0x4795b58fe09f6e43:0x459bf85384b50d51!8m2!3d49.2016866!4d7.0622879

Seems to work just fine.


#7

Crazy! If I try

https://api.openrouteservice.org/geocode/search?api_key=xxxxxxx&text=Provinzialstra%C3%9Fe%2035%2066130%20Saarbr%C3%BCcken

I found Luisenthal but not fechingen. This is the url I bevome from

https://openrouteservice.org/dev/#/api-docs/geocode/search/get


#8

You might want to use the /autocomplete endpoint. Somehow it provides better results.
It will give you both Luisenthal and Fechingen as results. (with Fechingen as first one)