<div dir="ltr">Hi,<br> 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'm clipping it to an area of about 1/12. The only thing is it'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"><<a href="mailto:craig.leat@gmail.com">craig.leat@gmail.com</a>></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>
> Hi, I've got a reasonably large shapefile that I wish to break down<br>
> into areas that match the topographic maps in NZMG. I've got a python<br>
> script that creates a shapefile with each topomap as a polygon in it<br>
> (and I can create a shapefile per topo map too if required). What I<br>
> can't work out how to do is to clip my master shapefile by the smaller<br>
> shapefiles. I've seen ideas of copying across the features if they<br>
> intersect with the clipping box, but the data is contour lines so I<br>
> want to "cut" the contour lines at the boundry of the clipping boxes.<br>
> Any ideas on the best way to do it, I can get MapWindow to do it<br>
> (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'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>