[GRASS5] vector point extract script

Hamish hamish_nospam at yahoo.com
Tue Apr 5 05:41:54 EDT 2005


Hamish:
> > not knowing enough SQL magic to do this properly*, I've written a
> > little script to extract point data from vector points files,
> > including x,y(,z) and any selected columns from the db of the same
> > name.
> > 
> > Assumes db and vector file both have the same category number/order.
> > This may well be a bad assumption!
> > 
> > v.out.ascii.db: 
> >   http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassAddOns
> > 
> > 
> > [*] I guess make 2 new columns containing x,y values then db.select.
> > How?

Radim:
> paste is probably dangerous, a record aor point can be missing. Isn't
> it better to use join (input must be sorted;

Yes it is; thanks. Script updated to use sort+join.


> use -e for attributes)?

Use -e where? for what?


> The possibility to export attributes should be added to v.out.ascii,
> but  it must be done better than in v.out.ogr. All attributes must be 
> selected by one query and read points using category index and keep an
> array of flags if the point was printed. At the end output points 
> without attributes.

added to the wish list. No time to try (ie learn) today.



Hamish




More information about the grass-dev mailing list