[GRASS-user] Questions: Clipping polygon layer to the outer boundary of another layer...

Moritz Lennert mlennert at club.worldonline.be
Thu Feb 21 07:46:15 EST 2008


On 13/02/08 12:48, Hamish wrote:
> Rick Reeves wrote:
>> I'm using v.in.ogr to clip a polygon set (in this case, county 
>> boundaries) to the boundary of a (rectangular) raster image.
>>
>> As far as I know, this is the only way to do this; I tried to create
>> a new location with the same boundaries and import the polygon
>> shapefile into the location, but clipping did not occur as expected.
>>
>> In any case, v.in.ogr did not clip the 'boundary polygons' to the the
>> edge of the raster image, but included the entire polygon. Only
>> excluded polygons completely outside of the bounding box are clipped.
> 
> I assume you used 'v.in.ogr spatial='. This works like v.select.
> 
>> There MUST be a way to clip all polygons to the bounding box edge.
>> Can any one suggest a way?
> 
> v.in.region + v.overlay.

Or v.in.region + v.select if you don't wan't to merge attribute tables.

Moritz


More information about the grass-user mailing list