I want to find red points count below picture. Using python. How can I do that? Using given angle, and distance according to placemark..
Every point has coordinate(latitude,longitude). Placemark also has coordinate.
Fro example, You can use angle 85 degress and its beamwitdh can be taken 50 degress.
there are many red dots in given area. I have some limitations (angle and distance). How can I count red dots?
BR,

Your question is relatively vague so for the time being I am going to assume that this is a circle.
Well, using some math, we can figure out how to get the distance, d, and angle, theta, coordinates based off of the x and y coordinates.
We know:
x^2 + y^2 = d^2tan(theta) = y/xFor the actual math behind this, you can draw a right triangle with angle theta, hypotenuse length d, horizontal length x, and vertical length y.
Solving for
thetaandd:d = sqrt(x^2 + y^2)theta = arctan(y/x)Our algorithm will be taking in a list of tuples (to represent points), and seeing if the angle each point makes is within a certain range. Additionally, we will check if the distance each point makes is less than our limit. If both of these conditions are met, then we will increase our total.
Now that we know how to find our coordinates based on the distance and angle, we can easily make our function:
Sample:
Output:
The first two points have an angle within 0 and 1.2 radians and a distance less than 4.
Note: For this function, we are assuming
angle1 < angle2, and that ifangle1dips below the horizontal axis, it will be negative. If your input hasangle1as positive, but is below the horizontal axis, just multiply it by-1before inputting it into the function.I hope this helped! Please let me know if you need any further help or clarification!