4 Extractions

Vector features can be extracted in different ways from a map: They can be selected by ID (called ``cat'' or ``category number'' in GRASS language), by attribute value via ``where'' SQL clauses or by geometry type (point, line, etc). As an example we can extract the interstates from the roads map by attribute. First we display the attribute table to see how it is written and how the column to be queried is named, then we extract the vector lines into a new map:

     d.erase

     d.vect roads

     v.db.select roads

     v.info -c roads

     v.extract roads out=interstates where="label='interstate'"

     d.erase

     d.vect interstates




© 2005, GDF Hannover bR - Solutions for spatial data analysis and remote sensing