0

I want to enter a range of 100 meters radius. The following query works, but I want to add a radius to the point.

select *
from rivers
where contains(shape, point(11.698366, 42.235607)) 

I have the points of a river and I want that although I am beside the river I find that I'm on the river

Is this possible, and if so, how would I accomplish this?

Raymond Nijland
  • 11,488
  • 2
  • 22
  • 34

1 Answers1

0

You could apply a buffer to your point, and check if the two geometries intersect:

select *
from rivers
where MBRIntersects(shape, st_buffer(point(11.698366, 42.235607), 100))
Sentinel
  • 6,379
  • 1
  • 18
  • 23