Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#787 closed enhancement (invalid)

v.in.db: add v.in.ogr-like "-t" option

Reported by: grasslandtom Owned by: grass-dev@…
Priority: normal Milestone: 6.4.0
Component: Vector Version: unspecified
Keywords: v.in.db Cc:
CPU: Unspecified Platform: Unspecified

Description

An option to v.in.db that allows importing points without creating an attribute table from the original table would be useful to avoid copying of (especially large) tables when attributes are either not needed in GRASS or the original table will be connected to the resulting vector.

Change History (5)

comment:1 by hamish, 14 years ago

v.db.select | v.in.ascii -t

?

the whole point of v.to.db is to add stuff to a table.

Hamish

comment:2 by grasslandtom, 14 years ago

Resolution: invalid
Status: newclosed

Oops! I see, I should have asked on the mailinglist before filing this.

Nevertheless: what I meant was something like

#import vector from table without copying the table:
v.in.db -t sometable x=x_col y=y_col cat=id_col out=somevector
# connect to original table
v.db.connect somevector table=sometable key=id_col

But this could be mimicked by

db.select sometable sql='select x_col,y_col,id_col from sometable' | v.in.ascii -t cat=3 out=somevector
v.db.connect somevector table=sometable key=id_col

Thus I set this to resolved as invalid.

Thanks for the hint with the pipe! Sorry for being to quick asking here.

Tom

comment:3 by neteler, 14 years ago

Tom, please consider to make this a FAQ entry at http://grass.osgeo.org/wiki/Category:FAQ

Markus

in reply to:  2 comment:4 by grasslandtom, 14 years ago

For the sake of completeness: I missed the c-flag for db.select (or as an alternative skip=1 for v.in.ascii).

I will add the whole thing to the FAQ later.

comment:5 by grasslandtom, 14 years ago

Thinking about a useful title for a FAQ-entry, I came to the conclusion that it might be better to add this as an example to the man-page of v.in.db. Though v.in.db is not used in the example, as a user I would search that man-page for a solution to the initialy described problem: "Import coordinates from table and use original table for attributes".

Any thoughts on this?

Note: See TracTickets for help on using tickets.