This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Get a random residential street name passing city, state?

0

Is there an API for OpenStreetMap that I can get a residential street name when passing city, state to it?

asked 02 Jan '19, 04:15

Xavier%20hammond's gravatar image

Xavier hammond
1111
accept rate: 0%

edited 03 Jan '19, 20:03

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

4

There are lots of different things that have built within the OSM ecosystem, so I can't rule out the possibility entirely, but it seems unlikely that there are any existing tools that have been designed to return a random street. You'd probably have to come up with your own custom-built solution. One way to do this would be to get the boundary of the city, select a random set of coordinates within that area, and then query a reverse geocoder to get a street near those coordinates.

answered 02 Jan '19, 19:56

alester's gravatar image

alester
6.6k266100
accept rate: 28%

Source code available on GitHub .