[postgis-users] St_within problem

Maxime van Noppen maxime at altribe.org
Mon Oct 19 08:50:23 PDT 2009


Bob Pawley wrote:
>  select st_astext(graphics.point_grid.the_geom)
>  from graphics.point_grid, library.dgm_process
>  where library.dgm_process.process_number = '1'
>  and st_within(graphics.point_grid.the_geom, library.dgm_process.the_geom);
>  
> Any thoughts would be appreciated.

Hi,

>From the documentation here :

http://postgis.refractions.net/documentation/manual-1.4/ST_Within.html

> boolean ST_Within(geometry A, geometry B);
> Returns TRUE if geometry A is completely inside geometry B. 

I suggest that you just swap the arguments of the ST_Within function as
 a geometry will never be "completly inside" a point.

-- 
Maxime



More information about the postgis-users mailing list