[postgis-users] Test a point in a geomety...
nton at photon.com
Thu Jun 12 08:50:08 PDT 2003
My apology, so does that mean that truly_inside() will be deprecated by
From: David Blasby [mailto:dblasby at refractions.net]
Sent: Wednesday, June 11, 2003 4:46 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Test a point in a geomety...
> SELECT name from airport_tbl where
> truly_inside(the_geom,GeomtryAsText('BOX3D( -99 50.2, -99 50.2)',-1)) =
Dont you use truly_inside! I'm going to delete it from postGIS so noone
ever uses it again.
You can use:
SELECT name FROM airport_tbl WHERE the_geom && GeomtryAsText('POINT(-99
50.2)',-1)) and distance(the_Geom,GeomtryAsText('POINT(-99 50.2)',-1))) ==0;
This uses the spatial index, so it should be fast.
NOTE: if the point is very very close to the boundary, the distance()
function may not return 0.
If you are using the GEOS enhanced postgis, you can do this calculation
robustly with the contains() function.
> It would be great if someone would teach a class on just creating
> queries on PostGIS. There's so much
> that you can do with it.
Yes - I'd love to write more documentation and examples for postGIS, but
I dont have the time. Does anyone out there have time?
postgis-users mailing list
postgis-users at postgis.refractions.net
More information about the postgis-users