Hi,
I'm trying to clip a largeish shapefile (100Mb) containing contour lines of a reasonably hilly area, into an area that is about 1/12 of it. I'm finding v.overlay very slow (in excess of 17 hours on a quad core 4GB Windows machine), am I doing something wrong?
I'm trying to clip a largeish shapefile (100Mb) containing contour
lines of a reasonably hilly area, into an area that is about 1/12 of
it. I'm finding v.overlay very slow (in excess of 17 hours on a quad
core 4GB Windows machine), am I doing something wrong?
during import with v.in.ogr use the spatial=w,s,e,n option to import only
relevant lines, or after import use v.select to crop out only lines which
fully or partly fall into your region. Then clip off fringes if needed
with v.overlay and a box created with v.in.region. It will be much faster
this time.
and I think you'll want v.in.region to use type=area, not line, otherwise
you risk only to get contour lines which cross the boundary and not those
that fall within it.
Unfortunately when I do that [use spatial, and use type=are] it's very fast, but all I end up with is a box (no contour lines).
My steps at the moment are:
v.in.ogr contour.shp out=S28 spatial=2690000,5950000,2730000,5980000
g.region vect=NZMG_bounds_s28
v.in.region output=cutter type=area --overwrite
v.overlay ainput=S28 atype=area binput=cutter output=S28_Clipped operator=and
->This makes a blank square
v.overlay ainput=S28 atype=line binput=cutter output=S28_Clipped operator=and
->Takes ages, but looks more promising (prints things like "Breaking lines...", just too slow.
and I think you'll want v.in.region to use type=area, not line, otherwise
you risk only to get contour lines which cross the boundary and not those
that fall within it.