[GRASS-user] v.in.ascii - put1 of 4 columns to 3D point file attribute

M S mseibel at gmail.com
Thu Apr 10 07:00:15 EDT 2008


Thanks for the various solutions.

The points are about 5 million per tile, and there are 23 tiles (about 115
million total).  I'm not sure if this is considered a large amount of mass
input points.

Perhaps the table size is OK.  I havent reached a size problem yet, but I
was trying to avoided it from the start.  Only using the xyz fields seems
like a good solution, and bringing in the 4th column attribute after the
fact, if it is even necessary.

Thanks much,
Mark


On Thu, Apr 10, 2008 at 2:39 AM, Hamish <hamish_b at yahoo.com> wrote:

> Mark wrote:
> > I have an ascii table of lidar data.  The columns are x,y,z, and a
> > fourth column containing an integer code of some sort.
>
> how many points are we talking about? millions? it the table becoming too
> huge?
>
> wc -l inputfile.txt
>
>
> > I have looked at the example in the man page about how to select
> > columns for importing via some shell manipulation of the input ascii
> > file, but I do not think it is applicable to what I'm doing (or perhaps
> > the caffeine boost is not in effect yet).  I have also tried various
> > combinations of parameters in v.in.ascii.
> >
> > I would like to import the XYZ to build the geometry for 3D points, and
> > have only "Cat" and "Code" in the attribute table.  ("Code" being a
> > column name for the 4th column in the input ASCII).  I cant seem to
> > find the combination of column definitions and other parameters to
> > achieve this.  One option seems to import them all as "x double, y
> > double, z double, code int", and then after the import, drop the x,y,z
> > columns.
>
> In GRASS 6.3:  v.db.dropcol
>
> For GRASS 6.2.3 you can examine that script and do the SQLite trick by
> hand:
>  http://trac.osgeo.org/grass/browser/grass/trunk/scripts/v.db.dropcol
>
> > Is it possible to put the first 3 ASCII column values to the geometry,
> > and use only the last column as an attribute?
>
>
> another idea is to crop the file to only include the cat and code
> columns,
>  cut -f1,4 -d',' inputfile.txt > outputfile.txt
> then use db.in.ogr (GRASS 6.3 only) to import the .csv file into SQLite,
> and then use v.db.connect to connect that database to your vector.
> (triple-check the cat+codes line up; is there a cat column or is that
> just sequential order? if so, use "seq" + "paste" to add that to the
> cut'ed code-only file)
>
>
> yet another idea is to do it like v.in.garmin/v.in.gpsbabel scripts, but
> that may be slow for many many points.
>
>
> > I'm using GRASS 6.2.3 and sqlite database.
>
>
>
> Hamish
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080410/18ab8038/attachment.html


More information about the grass-user mailing list