[GRASS-user] r.in.xyz and postrgresql

Hi

I am trying to import an xyz table from PostgreSQL db...

I can connect to the db and select/view rows using;

echo "select in.x, in.y, in.val from in" | db.select

x|y|val
2776480|2547420|12
2776510|2547420|12
2776540|2547420|12
2776570|2547420|12
2776600|2547420|12
2776420|2547390|12
2776450|2547390|12
2776480|2547390|12
2776510|2547390|12
2776540|2547390|12

But when I pipe the output to;

r.in.xyz -i input=- output=test fs="|"

I get an error "Bad y-coordinate line 1 column2. <y>"

Can anyone help please!

Thanks, Phil

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-in-xyz-and-postrgresql-tp6860616p6860616.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, 2011-10-04 at 17:52 -0700, kungphil wrote:

Hi

I am trying to import an xyz table from PostgreSQL db...

I can connect to the db and select/view rows using;

echo "select in.x, in.y, in.val from in" | db.select

x|y|val
2776480|2547420|12
2776510|2547420|12
2776540|2547420|12
2776570|2547420|12
2776600|2547420|12
2776420|2547390|12
2776450|2547390|12
2776480|2547390|12
2776510|2547390|12
2776540|2547390|12

But when I pipe the output to;

r.in.xyz -i input=- output=test fs="|"

I get an error "Bad y-coordinate line 1 column2. <y>"

You need to get rid of the column names (the first row of output is “x y val” instead of numbers).
Use the -c option to db.select to display without the column headers.


Can anyone help please!

Thanks, Phil

--
View this message in context: [http://osgeo-org.1803224.n2.nabble.com/r-in-xyz-and-postrgresql-tp6860616p6860616.html](http://osgeo-org.1803224.n2.nabble.com/r-in-xyz-and-postrgresql-tp6860616p6860616.html)
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.