I have a vector file containing the river lines of an area. I want to extract a specific water line from the vector. I used: v.db.select but it only displayed:


then i used v.extract to select a specific area and it displayed this error:

v.extract input=vector_waterLines@PERMANENT output=vector_1 where=1             
DBMI-DBF driver error:
ERROR: Unable select records from table <vector_waterLines>

The where switch should be an SQL statement. From the GRASS manual:

where=sql_query WHERE conditions of SQL statement without 'where' keyword Example: income < 1000 and inhab >= 10000

For example, if you want to extract only perennial streams:

v.extract input=vector_waterLines@PERMANENT output=vector_1 where="HYC_DESCRI = 'Perennial/Permanent'"

  • I want to extract only a specific line, but I'm not sure what is the label of that line. I tried v.extract input=vector_waterLines@PERMANENT output=vector_2 where="cat = '3'" but it displayed: DBMI-DBF driver error: ERROR: Unable select records from table <vector_waterLines> – teamAngat Mar 16 '11 at 14:17
  • the names in the database of my vector file have several "UNK" (unknown) values. That is why I cannot query well. Is there a site wherein I can download another vector file for the river lines? I got mine from (diva-gis.org/gdata) or is it possible for me to extract a specific river line since I can pinpoint it in the GIS Map display? – teamAngat Mar 16 '11 at 14:25
  • I'm pretty sure you can extract specific vector lines using the cat values. There must be something wrong with your dbf tables. – maning Mar 17 '11 at 2:10
  • Regarding river lines, I haven't seen diva-gis' data but you can get very good river lines on selected areas of the Philippines in Openstreetmap. – maning Mar 17 '11 at 2:11
  • I searched for the Openstreetmap and it was just viewable and cannot be downloaded in order to be opened in GRASS as a vector – teamAngat Mar 17 '11 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.