<div dir="ltr">Hi,<br>&nbsp; Thanks for that, I seem to have something working now (or so I think), my shape file is the contours lines for a reasonably hilly area (100Mb), and I&#39;m clipping it to an area of about 1/12.&nbsp; The only thing is it&#39;s still running about 17 hours later. Is v.overlay slow or have I done something wrong, here are my steps:<br>
<br>g.region vect=NZMG_s27<br>v.in.region output=cutter type=line --overwrite<br>v.overlay ainput=wellington_contours atype=line binput=cutter output=clipped operator=and<br><br>Thanks in advance<br><br>Matthew<br><br><br>
<div class="gmail_quote">On Thu, Sep 4, 2008 at 9:09 PM, Craig Leat <span dir="ltr">&lt;<a href="mailto:craig.leat@gmail.com">craig.leat@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Matthew<br>
<div><div></div><div class="Wj3C7c"><br>
Matthew Huck wrote:<br>
&gt; &nbsp;Hi, &nbsp;I&#39;ve got a reasonably large shapefile that I wish to break down<br>
&gt; into areas that match the topographic maps in NZMG. I&#39;ve got a python<br>
&gt; script that creates a shapefile with each topomap as a polygon in it<br>
&gt; (and I can create a shapefile per topo map too if required). What I<br>
&gt; can&#39;t work out how to do is to clip my master shapefile by the smaller<br>
&gt; shapefiles. I&#39;ve seen ideas of copying across the features if they<br>
&gt; intersect with the clipping box, but the data is contour lines so I<br>
&gt; want to &quot;cut&quot; the contour lines at the boundry of the clipping boxes.<br>
&gt; Any ideas on the best way to do it, I can get MapWindow to do it<br>
&gt; (sometimes, but it crashes frequently).<br>
<br>
</div></div>I use GRASS for this sort of task. The basic steps are:<br>
<br>
1. Import shape files using v.in.ogr<br>
2. Set the region extents (a bounding box for the area of interest)<br>
using g.region<br>
3. Make a vector to be used as a cutter - v.in.region<br>
4. Select within the region box and cut on the boundary using v.overlay<br>
<br>
It&#39;s quite easy to roll these steps into a script and is definitely<br>
the way to go if you have to do this many times.<br>
<br>
Craig<br>
<br>
gdal/ogr devs, an ogr2tiles.py would be quite nice.<br>
</blockquote></div><br></div>