[GRASSLIST:1422] s.to.vect

Hi all,

I have not managed to successfully convert a site data file into a point vector file.
I have done the following:

s.to.vect in=linear.pop out=linear.pop,

but the category values the module assigned were not the same as in the sites file. Seems like it assigned a sequence. I also tried to play with the cat parameter but without success. I did not understand very clear the meanings of type and index in cat.

The structure of the site file is a standard one.

labels|Easting|Northing|#No Label
410678.5|42622.5|%305.732
410677.5|42621.5|%305.732
410676.5|42620.5|%305.457
410674.5|42617.5|%305.182

Thanks in advance, Miha Staut

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

On Tue, 7 Oct 2003, Miha STAUT wrote:

Hi all,

I have not managed to successfully convert a site data file into a point
vector file.
I have done the following:

s.to.vect in=linear.pop out=linear.pop,

Since you left out the 'cat' parameter, you experienced the default behaviour
which isn't very useful. The sites format is very extensible while the 5.0
vector format is not so you need to specify in detail which attribute from
the sites file you want attached to the vectors.

but the category values the module assigned were not the same as in the
sites file. Seems like it assigned a sequence.

From the man page:

Field type ("string", "dim", or "decimal") and
index to use for the vector category value. By
default, the category number is used. The type is
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
The category number (or attribute number) will be an increasing sequential
number assigned to each site imported. What this is saying is that by default,
the category value will be the same as the category number. You need to
specifically say that you want the 1st decimal attribute in the sites file to
be the vector category value as follows:

s.to.vect in=linear.pop out=linear.pop cat=decimal,1

You have only one attribute in your sites file but you still need to say
that you want the first.

I would say that there are grounds for improving the default behaviour of
the program but then again it is possible to have a sites file without any
attributes, so maybe it is a good 'lowest common denominator' default.

Paul

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/