<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE type=text/css><!-- DIV {margin:0px;} --></STYLE>
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2>Saka,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2>Not sure if this answers your question. As long as
you have spatial indexes in place point in polygon queries should run pretty
fast. No you don't need to do point by point comparisons you can do point
by polygon comparisons</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2>You would do something along the line
of</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2>SELECT polytable.the_polygon,
pointtable.the_point</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2>FROM polytable INNER JOIN pointtable ON
ST_Intersects(the_polygon, the_point)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=265541119-04082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Saka
Royban<BR><B>Sent:</B> Monday, August 04, 2008 11:04 AM<BR><B>To:</B>
PostGIS<BR><B>Subject:</B> [postgis-users] question on
performance?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<DIV>Hi all. <BR>I've a large set of points and a set of polygons. I have
written a program for point in polygon of these dataset even writing its
algorithm.<BR>I wanted to know about performance of doing this by PostGIS.
however a cost of connection to postgis exists.<BR>also, can i do it in a bunch
manner other than just point by point using
PostGIS.<BR></DIV></DIV></DIV><BR></BODY></HTML>