[GRASS-user] Making contours from a table of x,y,z coordinates

Dr Barry MacEvoy b.macevoy at imperial.ac.uk
Mon Mar 2 09:49:38 EST 2009


Folks,

Firstly, I've only just started to use GRASS, so I hope this isn't
too painful to read for experienced users.

I've got a csv table of data with x,y,z coordinates representing
around 40 points in 3D space. z is the dependent variable (in fact,
it's the percentage of carbon found in soil samples at various
locations).

I'd like to make some contour lines for the z data, so I've carried
out the following steps:


1.Convert .csv file to a vector map
v.in.ascii -z 
input=/Users/bcmac/Desktop/test/final_data_for_contours.csv 
output=vector_xyz format=point fs=, skip=0 x=1 y=2 z=3 cat=1

2.Match region to vector map
g.region vect=vector_xyz at test

3.Check that region is sensible
g.region -p

4.Create an interpolated raster surface from the vector map
v.surf.idw --overwrite input=vector_xyz at test output=raster npoints=12 
layer=0

5.Create vector map of specified contours from raster map layer
r.contour --overwrite input=raster at test output=contours 
minlevel=0 maxlevel=90 step=5

6.Export vector map as .dxf
v.out.dxf --overwrite input=contours at sophie 
output=/Users/bcmac/Desktop/test/final.dxf

But when I look at the contours, they don't seem to follow the
original data - which I've plotted up in ArcGIS in the (x,y) plane
with the symbol size proportional to the value of z.

Have I gone horribly wrong? If so, where?

Thanks in advance for your help,

Barry.




--------------------------------------------------------------
Dr Barry MacEvoy
High Energy Physics Group
Imperial College London
Blackett Laboratory
Prince Consort Road
LONDON SW7 2BW
England

T: +44 20 7594 7802
F: +44 20 7823 8830
M: 07767 323871

http://www.hep.ph.ic.ac.uk/cms/people/based_at_imperial.html
http://www.hep.ph.ic.ac.uk/e-science/people/macevoy.html
--------------------------------------------------------------


More information about the grass-user mailing list