Answer the question
In order to leave comments, you need to log in
How to calculate the middle of an area using coordinates obtained from google maps?
Hello. I have a task: You enter an organization in the textbox (for example, the store "pyaterochka"), all coordinates are read from google maps through Selenium Web Browser (not done yet).
It turns out a certain area of organizations. We need to find the middle of this area.
How to randomly collect all the coordinates like there is a representation, but what's next ... How to form an area from them and find the middle is not clear.
I ask for help
Answer the question
In order to leave comments, you need to log in
Just like the middle of any segment is calculated.
Xmin + ((Xmax - Xmin) / 2)
where you have:
Xmin is Min(over all latitudes)
Xmax is Max(over all latitudes)
Same for longitude
1. Convert the coordinates to the plane .
2. The task is reduced to finding the center of the polygon
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question