[GRASSLIST:8792] Re: v.in.ascii help
Hamish
hamish_nospam at yahoo.com
Thu Oct 27 21:11:31 EDT 2005
> Hi all, i would like to import in GRASS the following ascii file with
> v.in.ascii and then convert it with v.to.rast
>
> What is the correct syntax of the commands in order to import
> correctly?
>
> UTMEast UTMNorth LandUse Soil texture Soil moisture NDVI
> 582200. 3.93700e+006 10 4 0.284077 0.522864
> 582200. 3.93680e+006 10 3 0.288844 0.468007
> 582200. 3.93660e+006 10 3 0.283344 0.335329
> 582200. 3.93640e+006 10 4 0.275129 0.295116
> 582200. 3.93620e+006 6 3 0.253937 0.273246
> 582200. 3.93600e+006 4 3 0.261889 0.270069
> 582200. 3.93580e+006 10 4 0.302256 0.130456
> 582200. 3.93560e+006 10 3 0.291805 0.208106
> 582200. 3.93540e+006 10 3 0.287783 0.310229
> 582200. 3.93520e+006 10 3 0.283377 0.224217
> 582200. 3.93500e+006 6 3 0.271582 0.164878
> 582200. 3.93480e+006 6 4 0.311506 0.174538
GRASS 6.0 you have to get rid of the first line, GRASS 6.1 you can use
"skip=1" to save the column titles to the map history, or start the
line with a '#' to skip past it.
v.in.ascii in=your_points.txt out=new_map x=1 y=2 skip=1 \
columns='UTMEast double, UTMNorth double, LandUse int, Soil_textr int, Soil_moist double, NDVI double'
"columns" names are optional, but useful. DBF DB only lets you set
column names as 10 characters long, no spaces. Each point will be
assigned its own category.
query with d.what.vect to check
Hamish
More information about the grass-user
mailing list