Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Enable v.in.ascii to read column names from ascii data table and use them for column names in attribute table created #4594

Open
cmbarton opened this issue Oct 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cmbarton
Copy link
Contributor

The problem
CSV is one of the most commonly and widely used formats for exchanging tabular data across platforms. However, it is difficult to import csv files into GRASS. Currently, v.in.ascii imports csv files (and other format ascii data table files) to create vector points. But it ignores the column names, assigning generic v1, v2, etc. While it is possible to subsequently rename attribute columns, this is cumbersome, especially for files with many columns.

Proposed solution
v.in.ascii obviously can parse the items in a row of a csv or other ascii data table. It also already has an option to specify how many rows to skip before parsing items as data (skip=).

It needs a new option to allow a user to select a row to parse as column names. The best option would be to have an argument to specify which row to use as column names in the generated attribute table. If row 0 is selected for column names, then columns would be named with the generic headers it uses now. The current argument that allows a user to manually specify column names and data types (columns=) should be retained of course.

See #4450 for additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant