1

I use cloudmade geocoding api for search some geographic entity in a certain city, but i don't know how to restrict search area by city. I try to use structured query, for example:

http://beta.geocoding.cloudmade.com/v3/api key/api/geo.location.search.2?q=[city=my_city_name]

but, response, what i retrieved, doesn't looked like what i need.

I know about bbox, but i don't know how to determine bbox for a certain city.

I will welcome any suggestions.

1 Answer 1

0

You can set city in Cloudmade Geocoding in v3

Note: Geocoding is only as good as the data that is, in the database. It can vary city by city or even street by street depending on the datasource.

Cloudmade Example:

http://beta.geocoding.cloudmade.com/v3/8ee2a50541944fb9bcedded5165f09d9/api/geo.location.search.2?source=OSM&q=[country=Germany]%20Berlin%20M%C3%BCllers%20Stra%C3%9Fe

Response:

<Response><places><Array pos="0"><addressType>street</addressType><city>~Berlin</city><country>Germany</country><featureType>Main road</featureType><position><lat>52.55108000</lat><lon>13.35101363</lon></position><state>Brandenburg</state><street>Müllerstraße</street><zip>13353</zip></Array></places><status><duration>1338</duration><procedure>geo.location.search.2</procedure><success>true</success></status></Response>

You can do a normal query (I have found this slower in response) http://beta.geocoding.cloudmade.com/v3/8ee2a50541944fb9bcedded5165f09d9/api/geo.location.search.2?source=OSM&q=10%20Downing%20Street,%20London

Response is

<Response><places><Array pos="0"><addressType>housenumber</addressType><city>~London/~Westminster</city><country>United Kingdom</country><featureType>Private Road</featureType><houseNumber>10</houseNumber><position><lat>51.50327773</lat><lon>-0.12763811</lon></position><state>England</state><street>Downing Street</street><zip>SW1</zip></Array></places><status><duration>2829</duration><procedure>geo.location.search.2</procedure><success>true</success></status></Response>

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.