Get the intersection of a polygon with a generated buffer in postgis

المشرف العام

Administrator
طاقم الإدارة
I have two tables. One has points in EPSG:4326 and the other one has polygons also in EPSG:4326. I loaded these two as layers in geoserver and show them using openlayers (as shown in image)

Now I want to write a query in postgis in which I find the intersection area of each green point (buffered by 200 meters) with the polygons.

I have written this query:

SELECT c.name, d.name FROM points c, polygons d WHERE ST_INTERSECTS(d.geom, ST_BUFFER(c.geom,500)) But I get no results. If I increase the buffer size to 5000000 then I get results.


  1. So the question is if there is a better way to do this without using a Buffer.
  2. If there is projection issue in which I am missing.




أكثر...
 
أعلى