[GRASS5] v.in.ascii updates
hamish_nospam at yahoo.com
Sun Mar 20 05:30:46 EST 2005
> Hamish wrote:
> > Hi,
> > I'm looking to do some v.in.ascii updates, I thought I'd trawl for
> > comments first.. most deal with format=point mode.
> > Fairly straight forward updates:
> > + update to use G_getl2() to make MacOS9 ascii import work.
done. (point mode only)
> > + add skip= option to skip any header lines when format=point
> > (e.g. column headings in cvs file)
> > + add a -s flag to write those skipped header lines to the map's
> > meta-data hist file (v.info -h).
> I think that you can simply write that to history without complicating
> the module with new flag?
good point, done. (point mode only)
> > Debatable updates:
> > ? skip any line starting with a '#' in input file.
> > (could silently ignore data..??)
done & documented in help page. (point mode only?)
> > ? skip blank lines in input file.
> > (currently extra newlines at EOF break import of points)
> User must be warn if there are errors in the file, empty line may be
> error in input. There should be probably a flag for shuch skipping.
not done. I'd like to ignore blank lines if they happen at end of file,
but don't see an easy way of doing that. I agree that blank lines mid-
file is an error.
> Maybe it should be done in a GUI? Normal GRASS user can use
> cat file | grap -v "^$" | grep -v "#"
I think that's a pretty serious definition of "Normal GRASS user".
> > ? strip "quotes" from both ends of varchar input.
> > ? rename format=standard to format=grass as format=point is
> > default,
> > so standard mode is non-standard. Confusing! I'll fix any
> > scripts/.
> ABSOLUTELY FORBIDDEN! The module options and behaviour MUST NOT change
> during the 6.x line. That applies to all modules and all developers
> without exceptions.
right. left as is.
Thanks to all for comments, they helped.
Hash (#) comments and skip= are for points mode only right now. Worth
putting in standard mode too? (skip doesn't make much sense there, but
might be a good way to write stuff to the history file?)
Please report any problems.
Please report if the massive input points memory leak is fixed/same/
worse. (e.g. LIDAR)
Mac people please report if .csv files saved in Excel-for-OSX work.
More information about the grass-dev