v.db.droprow(1)

πŸ’– v.db.droprow πŸ’–

okay bestie, welcome to the GRASS GIS User's Manual page for v.db.droprow(1) β€” yes she's a manual page, yes she's iconic, no you don't have to read it alone. grab a snack πŸ“, we're doing this together.


✨ NAME ✨

v.db.droprow β€” removes a vector feature from a vector map through attribute selection. like, ghosting a feature but with SQL. πŸ’…


🏷️ KEYWORDS 🏷️

vector, attribute table, database


🌈 SYNOPSIS 🌈

v.db.droprow
v.db.droprow --help
v.db.droprow input=name  [layer=string]  where=sql_query output=name
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags:

  • --overwrite β€” allow output files to overwrite existing files. she will simply replace them, no hesitation. πŸ’€
  • --help β€” print usage summary. your little cheat sheet bestie 🫢
  • --verbose β€” verbose module output. she talks more. love that for her.
  • --quiet β€” quiet module output. she's giving ✨mysterious✨
  • --ui β€” force launching GUI dialog. for the visual girlies πŸŽ€

πŸ’œ Parameters:

  • input=name [required] β€” name of input vector map. or, plot twist, data source for direct OGR access. πŸ‘‘
  • layer=string β€” layer number or name. vector features can have category values in different layers, and this number determines which layer to use. when used with direct OGR access, this is the layer name. default: 1. 🌸
  • where=sql_query [required] β€” WHERE conditions of SQL statement without the 'where' keyword. example: income < 1000 and population >= 10000. no cap, you literally just drop the condition in there.
  • output=name [required] β€” name for output vector map. your new baby πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

v.db.droprow removes vector object(s) β€” point, line, area, face, etc. β€” from a vector map through attribute selection in the table connected to the given vector map. so like. the attributes are the vibe check, and the features that fail it get removed. πŸ™ˆ

it automatically checks the connection for the specified layer. she's thorough. she checks. periodt.


πŸ’… NOTES πŸ’…

v.db.droprow is a front-end to v.extract (reverse selection) to allow easier usage. it's giving "why do the hard version when the easy version exists". ✨

the existing database connection(s) can be verified with v.db.connect. go check on them, they miss you.


πŸ”₯ EXAMPLES πŸ”₯

dropping all vector points without elevation attribute (North Carolina data set):

g.region raster=elevation -p
v.random output=rand5k_elev n=5000
v.db.addtable map=rand5k_elev column="elevation double precision"
v.what.rast vect=rand5k_elev rast=elevation column=elevation
# verify absence of some elevation attributes ("number of NULL attributes"):
v.univar rand5k_elev type=point column=elevation
# Remove all vector points lacking elevation attribute
v.db.droprow rand5k_elev output=rand5k_elev_filt where="elevation IS NULL"
# verify:
v.univar rand5k_elev_filt type=point column=elevation

she builds the map, adds the table, fills in the elevation, checks what's missing, and then yeets every point with no elevation into the void with where="elevation IS NULL". then verifies. because we always verify. ate and left no crumbs. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

db.droptable, db.execute, v.db.addcolumn, v.db.addtable, v.db.connect, v.db.dropcolumn, v.db.droptable, v.db.select, v.db.update

GRASS SQL interface


πŸ’œ AUTHOR πŸ’œ

Markus Neteler


🌟 SOURCE CODE 🌟

available at: v.db.droprow source code (history)

accessed: Saturday Jan 17 05:41:52 2026

main index | vector index | topics index | keywords index | graphical index | full index


okay so that's the whole page bestie, you made it 🫢 and just so you know, this was GRASS GIS 8.4.2 β€” Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual β€” so yeah, copyrighted, iconic, and fr fr yours to go drop some rows with. now go where="vibe IS NULL" and clear out the haters. mwah πŸ’‹πŸŒΈβœ¨

πŸ“¦ where this page comes from