[GIS] Google API for Boundary coordinates

coordinatesdatagoogle-maps-apishapefile

Is there any Google API (or any other) which can provide boundary information (i.e. Lat, Lng) for a particular location. Location can be a city, district or a region with in a city. For Example Dammam city (Saudi Arabia), Al-Azizia (District of Dammam) etc

Currently my requirement is, data for, Ta'if. I want Lat, Lng coordinates because I want to draw polygon around region.

Here is another similar question, which dosen't provide complete answer. Seeking neighborhood boundaries for Saudi Arabia?

Best Answer

If JavaScript is an option for you, you can use the geocoding service of Google maps API. When you send a geocoding request, you get in response a GeocoderResults object. One if its properties is a geometry object, which in turn has a property called bounds. This is actually a LatLngBounds object, that represnts the area of the geocoding result.

This method will only give you the general area of your location, of course. If you need the actual boundaries as an accurate polygon, you will have to look for that data in other sources.

See here for more details: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingResults