I want to develop a C# app that can reverse GeoCode polygon and give me all the addresses that can be found inside the area of the polygon.
I managed to find a solution to reverse GeoCode long and lat coordinates as shown below:
- static string ReverseGeoCoding(string latitude, string longitude)
- {
- var json = new WebClient().DownloadString(baseUrlRGC + latitude.Replace(" ", "") + "," + longitude.Replace(" ", "") + plusUrl);
-
- GoogleGeoCodeResponse jsonResult = JsonConvert.DeserializeObject<GoogleGeoCodeResponse>(json);
-
- string status = jsonResult.status;
-
- tring geoLocation = String.Empty;
- if (status == "OK")
-
- {
- for (int i = 0; i < jsonResult.results.Length; i++)
- {
- geoLocation += "Address: " + jsonResult.results[i].formatted_address + Environment.NewLine;
-
- }
- return geoLocation;
- }
- else
- {
- return status;
- }
- }
However what I want is a solution to provide multiple coordinates for the polygon and return all addresses inside the area.