[GRASS-user] XY trace plots

Hamish hamish_b at yahoo.com
Sun May 20 06:11:20 EDT 2012


> John wrote:
> > I have an ascii file in .csv format containing x/y coordinates and z
> > values. Z column data represents geophysical data collected along
> > parallel lines (X and Y coordinates). I wish to display this data in a
> > format similar to an XY trace plot (see image example), where z data
> > recorded along individual traverses in the field can be displayed as a
> > raster image of parallel lines showing both negative and positive
> > responses along each line. So far I have imported small data sets using
> > both v.in.ascii  and v.in.lines with also use of v.build.polylines but
> > the results only produce a single flat line. It is most likely I am not
> > going the right way about this, hence my query. I have searched the mail
> > archive in advance of this mail and found no relevant reference. Is it
> > possible to produce such a display with GRASS?

Hamish:
> the module has not been written yet, but you might try
> importing it with r.in.xyz then interpolating with r.surf.nnbathy
> (addons) or one of the other r.surf.* or v.surf.* modules.

Since we can't have missing functionality, I've just added an experimental
module in GRASS addons called r.to.vect.lines. If you can import and
interpolate it into a raster map, you can extract every n-th line as a
3D vector line. With that you can then proceed with Daniel's idea of
displaying it in NVIZ.

   http://grass.osgeo.org/wiki/GRASS_AddOns#r.to.vect.lines

(example using the spearfish elevation map attached)


With your original dataset, if you can know for sure the lines are either
one big continuous one or that they are broken somehow, you might have a
try with the GRASS ascii format described in the v.in.ascii help page.
(format=standard [not the default points import])


good luck,
Hamish

ps- if any python+ctypes experts want to have a look over it please do...
especially to fix the G_is_null_value() call which is currently broken.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nviz_wiggle.png
Type: image/png
Size: 14906 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20120520/da2eb801/nviz_wiggle.png


More information about the grass-user mailing list