[postgis-users] point in polygon or equivalent

Mark Wright sparkymeister at gmail.com
Mon Jan 2 19:17:00 PST 2006


What is the benefit to using the contains() or within() functions
rather than the ~ operator? I've tested both and they give the same
results in the same amount of time (plus or minus about 20
miliseconds).


Mark

On 12/30/05, Paul Ramsey <pramsey at refractions.net> wrote:
> select *
> from mytable
> where mytable.the_geom && geomfromtext('POINT(X Y)',<srid>)
> and contains(mytable.the_geom, geomfromtext('POINT(X Y)',<srid>)


--
Have fun or die trying - but try not to actually die.
http://www.AboveCalifornia.com
Got Mac OS X? Get the AboveCalifornia Sherlock Channel:
sherlock://www.AboveCalifornia.com/sherlock/SherlockChannel.xml?action=add



More information about the postgis-users mailing list