How to find all points away from some polygon?

Posted by Z77 on Stack Overflow See other posts from Stack Overflow or by Z77
Published on 2010-06-15T14:01:44Z Indexed on 2010/06/15 14:12 UTC
Read the original article Hit count: 196

Filed under:
|

What I need is to find all points away from rectangle for 10km. Points geometry is the_geom1, rectangles (polygon) geometry is the_geom2. SRID of them is 4258.

I tried:

SELECT * 
FROM table1,table2 
WHERE ST_DWithin(table1.the_geom1,table2.the_geom2,10000) 
      and table1.gid=2;

But the result is not Ok.

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about postgis