[GRASS-user] select features which are completely within a polygon

Moritz Lennert mlennert at club.worldonline.be
Fri May 30 12:23:26 EDT 2008

On 29/05/08 21:49, Manuel Sangiao wrote:
> Hello list,
> someone know how to select features (lines) which are completely within 
> a polygon layer?
> I have one layer two layers, one with the country boundary (i.e. USA) 
> and another with the states boundaries (i.e. USA states Alabama, Arizon, 
> etc.). The original data are polygon features. Since i need only the 
> boundaries I have processed the layers and converted them into line 
> features.
> The problem appears when I try to remove the common boundaries 
> (country-state). So I need only the inner states boundaries. So I have 
> tried to select, with v.select, the lines (boundaries) which are 
> completely within the country (polygon), without the common country 
> boundary. I have tried as well with v.overlay (xor). But without 
> positive results.
> Can someone help me?

Just brainstorming: You might be able to do something with a combination 
of v.to.points (country boundaries) and v.distance (from points to state 
boundary lines) to identify the state boundary lines that you would like 
to delete, then use v.edit to identify line ids based on cats, then to 
delete those lines based on their line id.

But haven't thought about it long enough to be sure it works.


More information about the grass-user mailing list