I think that if you built GDAL with GEOS support, you can call on the GEOS methods from directly within your ogr objects.&nbsp; (Not sure I&#39;m saying that right)&nbsp; There is an example here - <a href="http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/python/geometriespdf">
http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/python/geometriespdf</a><br><br>Code in the example looks something like this:<br><br>#! /usr/bin/python<br><br>import ogr<br><br>r1 = {&#39;minx&#39;: -5.0
, &#39;miny&#39;: 0.0, &#39;maxx&#39;: 5.0, &#39;maxy&#39;:10.0}<br>r2 = {&#39;minx&#39;: 0.0, &#39;miny&#39;: -5.0, &#39;maxx&#39;: 10.0, &#39;maxy&#39;:5.0}<br><br>template = &#39;POLYGON ((%(minx)f %(miny)f, %(minx)f %(maxy)f, %(maxx)f %(maxy) f, %(maxx)f %(miny)f, %(minx)f %(miny)f))&#39;
<br><br>w1 = template % r1<br>w2 = template % r2<br><br>g1 = ogr.CreateGeometryFromWkt(w1)<br>g2 = ogr.CreateGeometryFromWkt(w2)<br><br>inter = g1.Intersection(g2)&nbsp;&nbsp; # &lt;---------------GEOS Intersection command?<br><br>
print inter<br><br>--<br><br><div class="gmail_quote">On Jan 22, 2008 11:31 AM, Brian Hamlin &lt;<a href="mailto:maplabs@light42.com">maplabs@light42.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
thats a good application of PostGIS<br>I think people can do it with GEOS directly, but I have not written<br>that myself<br><font color="#888888"><br> &nbsp;-Brian<br></font><div><div></div><div class="Wj3C7c"><br><br>On Jan 22, 2008, at 10:40 AM, 
<a href="mailto:estrada.adam@gmail.com">estrada.adam@gmail.com</a> wrote:<br><br>&gt; All,<br>&gt; &nbsp; &nbsp; I have quite a bit of LIDAR data that has been converted to point<br>&gt; shapefiles. &nbsp;I need to select all the points that intersect with
<br>&gt; another polygon shapefile and then write those features to another<br>&gt; layer (shapefile). &nbsp;ArcGIS will definitely do it but I am afraid that<br>&gt; my machine is not beefy enough to handle LIDAR-sized datasets so I was
<br>&gt; wondering if anyone knew of some functionality in OGR lib that would<br>&gt; do this for me? &nbsp;I cannot seem to figure out how to select by location<br>&gt; with the set of tools that are available i.e ogr2ogr...<br>
&gt;<br>&gt; Many thanks in advance,<br>&gt; AWE<br>&gt; _______________________________________________<br>&gt; gdal-dev mailing list<br>&gt; <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>&gt; 
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br><br>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org">
gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div></div></blockquote></div><br>