[GRASS5] vector point extract script
Radim Blazek
blazek at itc.it
Tue Apr 5 03:43:23 EDT 2005
Hamish wrote:
> Hi,
>
> 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?
>
>
>
> Hamish
paste is probably dangerous, a record aor point can be missing. Isn't it
better to use join (input must be sorted; use -e for attributes)?
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.
Radim
More information about the grass-dev
mailing list