TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abel Zimusi
NA
19
661
How do I reverse Geocode a polygon to get addresses inside i
Sep 17 2019 4:04 AM
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);
//concatenate URL with the input lat/lng and downloads the requested resource
GoogleGeoCodeResponse jsonResult = JsonConvert.DeserializeObject<GoogleGeoCodeResponse>(json);
//deserializing the result to GoogleGeoCodeResponse
string
status = jsonResult.status;
// get status s
tring geoLocation = String.Empty;
if
(status ==
"OK"
)
//check if status is OK
{
for
(
int
i = 0; i < jsonResult.results.Length; i++)
//loop throught the result for addresses
{
geoLocation +=
"Address: "
+ jsonResult.results[i].formatted_address + Environment.NewLine;
//append the result addresses to every new line
}
return
geoLocation;
//return result
}
else
{
return
status;
//return status / error if not OK
}
}
However what I want is a solution to provide multiple coordinates for the polygon and return all addresses inside the area.
Reply
Answers (
0
)
C# in App_Web_qy3z2pcs.dll but was not handled
custom paging in repeater without using store procedure c#