[postgis-users] Test a point in a geomety...

chodgson@refractions.net chodgson@refractions.net
Wed Jun 11 21:30:32 2003


Nick,

>From the postgis documentation:
truly_inside(geometryA,geometryB) - Returns true if any part of B is within the 
bounding box of A.

This is clearly not what you want, you're not talking about bounding boxes at 
all. If you're trying to check if a point is inside or on the border of a 
polygon, then use the distance() function (where distance(a,b)=0). I think 
that's what you want...

HTH.

Chris

Quoting Nick Ton <nton@photon.com>:

> 
> 
> Hi,
> 
> I am a newbie to PostGIS queries, I was wondering if this is an appropriate
> or efficient way for testing if
> a point is in a geomety.
> 
> SELECT name from airport_tbl where
> truly_inside(the_geom,GeomtryAsText('BOX3D( -99 50.2, -99 50.2)',-1)) =
> true;
> 
> It would be great if someone would teach a class on just creating effective
> queries on PostGIS. There's so much
> that you can do with it.
> 
> Thanks,
> Nick
> 
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>