[GRASS-user] dbf File not being Created with v.in.ascii

I have a vector of data points that I imported from a CSV file (which was created with R). When I use v.in.ascii, no DBF file is created. I basically need this file so I can assign different colors to data points based on the value of the datapoint. The vector is imported correctly, but the DBF is not created.

v.in.ascii -n input=‘/Users/ryan/Desktop/Desktop Stuff/ems/responseTime.csv’ output=response format=point fs=, skip=1 columns=‘y double, x double, z double’ x=2 y=1 z=3 cat=0 --overwrite

What am I doing wrong? I have attempted this with both the GUI and the command line and both with and without the quotes as suggested in a previous post. DBF files for the other vectors I imported (from ESRI) are showing up though.

Thanks,
Ryan

On Sun, 22 Jul 2007, Ryan Rosario wrote:

I have a vector of data points that I imported from a CSV file (which was
created with R). When I use v.in.ascii, no DBF file is created. I basically
need this file so I can assign different colors to data points based on the
value of the datapoint. The vector is imported correctly, but the DBF is not
created.

v.in.ascii -n input='/Users/ryan/Desktop/Desktop Stuff/ems/responseTime.csv'
output=response format=point fs=, skip=1 columns='y double, x double, z
double' x=2 y=1 z=3 cat=0 --overwrite

What am I doing wrong? I have attempted this with both the GUI and the
command line and both with and without the quotes as suggested in a previous
post. DBF files for the other vectors I imported (from ESRI) are showing up
though.

Just a guess, but are there only the x, y, and z co-ordinates in the CSV file? If there are no other fields and you're creating a 3-D vector as here then perhaps it tries to be clever and skips creating the database table?

I would suggest leaving out the "z=3". If you are using the z co-ordinate as an attribute and want it to be in the database then it doesn't really make sense importing it as a 3-D co-ordinate. Also I notice it should be considered (IMHO) a bug, or at least a documentation bug in v.in.ascii that it automatically creates a 3-D vector if you specify the z= option, even if the -z flag has not been specified - what's the point in having the -z flag anyway if specifying z= automatically assumes you want a 3-D map?

Does leaving out z=3 lead to any success?

Paul

Hi,

you are doing nothing wrong, the table is just created if needed. See

http://www.nabble.com/v.in.ascii-create-a-dbtable-tf3531086.html#a9854181

Maybe would be good to mention it in man pages of the module.

Martin

2007/7/23, Ryan Rosario <uclamathguy@gmail.com>:

I have a vector of data points that I imported from a CSV file (which was
created with R). When I use v.in.ascii, no DBF file is created. I basically
need this file so I can assign different colors to data points based on the
value of the datapoint. The vector is imported correctly, but the DBF is not
created.

v.in.ascii -n input='/Users/ryan/Desktop/Desktop
Stuff/ems/responseTime.csv' output=response format=point fs=, skip=1
columns='y double, x double, z double' x=2 y=1 z=3 cat=0 --overwrite

What am I doing wrong? I have attempted this with both the GUI and the
command line and both with and without the quotes as suggested in a previous
post. DBF files for the other vectors I imported (from ESRI) are showing up
though.

Thanks,
Ryan

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

Ryan Rosario wrote on 07/23/2007 07:40 AM:

I have a vector of data points that I imported from a CSV file (which
was created with R). When I use v.in.ascii, no DBF file is created. I
basically need this file so I can assign different colors to data
points based on the value of the datapoint. The vector is imported
correctly, but the DBF is not created.

v.in.ascii -n input='/Users/ryan/Desktop/Desktop
Stuff/ems/responseTime.csv' output=response format=point fs=, skip=1
columns='y double, x double, z double' x=2 y=1 z=3 cat=0 --overwrite

What am I doing wrong? I have attempted this with both the GUI and the
command line and both with and without the quotes as suggested in a
previous post. DBF files for the other vectors I imported (from ESRI)
are showing up though.

If you also have attribute columns, you have to define them (columns
parameter).
See
g.manual v.in.ascii
for an example (eg, Example 5).

Markus

PS: Unrelated - for table only input I have added 'db.in.ogr' to GRASS
6.3-CVS which
imports DBF, CSV etc.

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Martin Landa wrote on 07/23/2007 09:32 AM:

Hi,

you are doing nothing wrong, the table is just created if needed. See

http://www.nabble.com/v.in.ascii-create-a-dbtable-tf3531086.html#a9854181

Maybe would be good to mention it in man pages of the module.

Done.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Thanks for the suggestions.

I tried that and it did not work. I added an extra column to my data file called category and exported it to CSV. I then read in the vector using

v.in.ascii input=‘responseTime.csv ’ output=response format=point fs=’,’ skip=1 col=‘y double, x double, cat int’ x=2 y=1 cat=3 --overwrite

I did this both in the GUI and command-line and I also deleted the previous vector in case there was garbage left over.

v.info response shows no dblinks.

Is there something else I can try?

Ryan

On 7/23/07, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

you are doing nothing wrong, the table is just created if needed. See

http://www.nabble.com/v.in.ascii-create-a-dbtable-tf3531086.html#a9854181

Maybe would be good to mention it in man pages of the module.

Martin

2007/7/23, Ryan Rosario <uclamathguy@gmail.com>:

I have a vector of data points that I imported from a CSV file (which was
created with R). When I use v.in.ascii, no DBF file is created. I basically
need this file so I can assign different colors to data points based on the
value of the datapoint. The vector is imported correctly, but the DBF is not
created.

v.in.ascii -n input=‘/Users/ryan/Desktop/Desktop
Stuff/ems/responseTime.csv’ output=response format=point fs=, skip=1
columns=‘y double, x double, z double’ x=2 y=1 z=3 cat=0 --overwrite

What am I doing wrong? I have attempted this with both the GUI and the
command line and both with and without the quotes as suggested in a previous
post. DBF files for the other vectors I imported (from ESRI) are showing up
though.

Thanks,
Ryan


grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser


Martin Landa <landa.martin@gmail.com > * http://gama.fsv.cvut.cz/~landa *


Get Thunderbird!

Can you post the first two lines of you CSV file? Otherwise the problem
is hard to understand. So far you still don't define any attribute columns,
hence, no DBF (or other table) is generated.

Markus

Ryan Rosario wrote on 07/24/2007 09:26 AM:

Thanks for the suggestions.

I tried that and it did not work. I added an extra column to my data
file called category and exported it to CSV. I then read in the vector
using

v.in.ascii input='responseTime.csv ' output=response format=point
fs=',' skip=1 col='y double, x double, cat int' x=2 y=1 cat=3 --overwrite

I did this both in the GUI and command-line and I also deleted the
previous vector in case there was garbage left over.

v.info <http://v.info> response shows no dblinks.

Is there something else I can try?

Ryan

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Perhaps I am not understanding what you mean by defining attribute columns.
Below are the first two lines of my csv file.

Latitude,Longitude,Category
34.420757,-119.685126,1

Thanks again,
Ryan

Markus Neteler wrote:

Can you post the first two lines of you CSV file? Otherwise the problem
is hard to understand. So far you still don't define any attribute
columns,
hence, no DBF (or other table) is generated.

Markus

Ryan Rosario wrote on 07/24/2007 09:26 AM:

Thanks for the suggestions.

I tried that and it did not work. I added an extra column to my data
file called category and exported it to CSV. I then read in the vector
using

v.in.ascii input='responseTime.csv ' output=response format=point
fs=',' skip=1 col='y double, x double, cat int' x=2 y=1 cat=3 --overwrite

I did this both in the GUI and command-line and I also deleted the
previous vector in case there was garbage left over.

v.info <http://v.info> response shows no dblinks.

Is there something else I can try?

Ryan

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
View this message in context: http://www.nabble.com/dbf-File-not-being-Created-with-v.in.ascii-tf4127648.html#a11776634
Sent from the Grass - Users mailing list archive at Nabble.com.