<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hello,<br><br>I suspected that something like below was happening, although the documentation I read regarding the -spat option presents it as a clipping function. I was surprised by the result. I am new to all of this and have no computer science background so I am not familar with a "bbox" . Although I know Python is a flexible multi platform language (I see a lot of references in the Linux world), attempting to learn the language to write a script to do this job or to understand someone else's script I believe would be beyond my time constraints for the current project. I did try to import both shape files into GRASS as layers and then tried to overlay (v.overlay) them but got error messages which I couldn't
understand but were basically complaining about missing attributes. Not sure what attributes it was referring to. Is there actually no way to do this within GRASS or QGIS that retains the feature of the shapefile (everthing within the clipping region) without having to learn a programming language? Would seem to be a desirable function. Not adverse to learning a program language but it would be a much longer term goal. <br><br>Thanks<br><br>Alyre<br><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Tyler Mitchell (OSGeo) <tmitchell@osgeo.org><br>To: Ottawa (Canada) Local Chapter List <ottawa_users@lists.osgeo.org><br>Sent: Monday, February 18, 2008 12:26:36 PM<br>Subject: Re: [Ottawa_users] Clipping shapefiles with ogr2ogr<br><br>On 18-Feb-08, at 6:22 AM, Paul Spencer wrote:<br><br>> My first guess is that ogr2ogr doesn't clip, it uses the
bbox as a <br>> spatial selection and keeps anything that intersects with the <br>> bbox. Would this account for your results?<br><br>That's right, it cannot clip, but will select/return all features <br>that fit in the area. You can't use ogr2ogr for clipping but I <br>believe you could write a Python script that calls the OGR and GEOS <br>functions to do this job.<br><br>Tyler<br>_______________________________________________<br>Ottawa_users mailing list<br><a ymailto="mailto:Ottawa_users@lists.osgeo.org" href="mailto:Ottawa_users@lists.osgeo.org">Ottawa_users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/ottawa_users" target="_blank">http://lists.osgeo.org/mailman/listinfo/ottawa_users</a><br></div><br></div></div><br>
<hr size=1>Ask a question on any topic and get answers from real people. <a href="http://ca.answers.yahoo.com"><b>Go to Yahoo! Answers.</b></a>
</body></html>