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

Micha Silver micha at arava.co.il
Wed Oct 5 01:17:16 EDT 2011


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
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> This mail was received via Mail-SeCure System.
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20111005/410eadbe/attachment.html


More information about the grass-user mailing list