example: Given 3 points (1,1),(2,2),(5,5)
and a rectangle (0,0)(3,3)
, get 2 points (1,1)
and (2,2)
.
It's easy to get points in a circle using georadius
, but it seems that there is not a convenient way to get points in a rectangle.
example: Given 3 points (1,1),(2,2),(5,5)
and a rectangle (0,0)(3,3)
, get 2 points (1,1)
and (2,2)
.
It's easy to get points in a circle using georadius
, but it seems that there is not a convenient way to get points in a rectangle.
There's no built-in way to do that.
However, you can do a spatial search with a circle that can cover the whole rectangle. For each retrieved point, check if it's inside the rectangle.