[GRASSLIST:6040] XYZ input in Grass6?

Having used s.in.ascii in 53 and 54, to import files containing lat long
depth/height, I'm having difficulty achieving the same in 6.0.0beta (OSX).

Does anybody know how to import such files in Grass 6?

Thanks,

Lawrence

Hi Lawrence,

It would be helpful if you told us how you did it previously! That could point towards possible solutions.

Anyway, I recently had to do something similar myself and came up with the code below. You will have to hack it for your won purpose!

Good luck,

Sander.

###########################
## set correct resolution!!
## resolution should be 10min = 10/60 = 0.1666666666666667
g.region res=0.166666666667

# grass does not like column names!
fileName=/data1/gisdata/southafrica/climate/cru/cru_10min_tmp_SA.txt
echo $fileName
g.remove vect=cru_tmp
cat $fileName | v.in.ascii fs=',' out=cru_tmp x=2 y=3 cat=1
+ columns='cat int, x double, y double, tmp1 double, tmp2 double,
+ tmp3 double, tmp4 double, tmp5 double, tmp6 double, tmp7 double,
+ tmp8 double, tmp9 double, tmp10 double, tmp11 double, tmp12 double'
db.describe -c table=cru_tmp

## convert vector points to raster
vectIn=cru_tmp
for a in $( seq 1 12 ) ; do
  rastOut=cru_tmp${a:-6} # use 6 if a is not declared
  colName=tmp${a:-6}
  g.remove rast=$rastOut
  v.to.rast input=$vectIn output=$rastOut col=$colName
  r.describe $rastOut -r
  ## display
  r.colors map=$rastOut color=rainbow
done
###########################

Lawrence Moran wrote:

Having used s.in.ascii in 53 and 54, to import files containing lat long
depth/height, I'm having difficulty achieving the same in 6.0.0beta (OSX).

Does anybody know how to import such files in Grass 6?

Thanks,

Lawrence

--
--------------------------------------------
Dr. Sander P. Oom
Animal, Plant and Environmental Sciences,
University of the Witwatersrand
Private Bag 3, Wits 2050, South Africa
Tel (work) +27 (0)11 717 64 04
Tel (home) +27 (0)18 297 44 51
Fax +27 (0)18 299 24 64
Email sander@oomvanlieshout.net
Web www.oomvanlieshout.net/sander
---------------------------------------------

Having used s.in.ascii in 53 and 54, to import files containing lat long
depth/height, I'm having difficulty achieving the same in 6.0.0beta (OSX).

Does anybody know how to import such files in Grass 6?

v.in.ascii -z [-t]

Hamish

V.in.ascii works for this. I've had the best results using decimal degrees
(I usually use UTM's). Hamish posted a description of the format you need to
use for degrees/minutes/seconds. I don't remember it, but it was within the
past month if you want to check the archives.

Michael
____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

From: Lawrence Moran <lm511@york.ac.uk>
Date: Mon, 07 Mar 2005 16:43:07 +0000
To: GrassList <GRASSLIST@baylor.edu>
Subject: [GRASSLIST:6040] XYZ input in Grass6?

Having used s.in.ascii in 53 and 54, to import files containing lat long
depth/height, I'm having difficulty achieving the same in 6.0.0beta (OSX).

Does anybody know how to import such files in Grass 6?

Thanks,

Lawrence