Per Radim's suggestions I have created a new module called v.drape, wich will
create a 3D vector from a 2D vector and an elevation surface. Vector code was
borrowed from v.split, and raster sampling was based on code from v.sample.
Attached is an initial version of the source code, which seams to work fine
for lines. I still need to add support for points, and add some error
checking. Also, I have commented using Doxygen-style formatting, for later
programmer's manual creation. If this looks ok to you guys, I will write up
the description.html as soon as I can.
The new command works like this:
v.drape -C in=trails output=trails3d rast=elev_meters
A new 3D vector file is created, with a copy of the original DB table.
Cheers,
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
On Wednesday 28 September 2005 12:09 am, Radim Blazek wrote:
Hi,
I intended
v.drape input=my2d rast=dem output=my3d
v.out.pov input=my3d
Would it be a problem to create one more map?
But if you put most of functionality to
G_sample_raster(raster_file, method, point_x, point_y)
it is ok for me also to add it to v.out.pov.
Also it would be nice if you could contribute also v.drape
(should be simple with G_sample_raster).
Note that output of v.drape (or v.to.3d?) can be also used in
nviz.
On Wednesday 28 September 2005 02:20 pm, Dylan Beaudette wrote:
Hi Radim and Markus,
Per Radim's suggestions I have created a new module called v.drape, wich
will create a 3D vector from a 2D vector and an elevation surface. Vector
code was borrowed from v.split, and raster sampling was based on code from
v.sample.
Attached is an initial version of the source code, which seams to work fine
for lines. I still need to add support for points, and add some error
checking. Also, I have commented using Doxygen-style formatting, for later
programmer's manual creation. If this looks ok to you guys, I will write up
the description.html as soon as I can.
The new command works like this:
v.drape -C in=trails output=trails3d rast=elev_meters
A new 3D vector file is created, with a copy of the original DB table.
Cheers,
Ooops! I just sent the wrong version, which was missing support for points as
well.
Also note that the syntax is
v.drape [ -B | -C ] in=trails output=trails3d rast=elev_meters
where the -B or -C refere to bilinear or cubic interpolation, default is
nearest neighbor.
Attached is the current version:
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
On 9/29/05, Dylan Beaudette <dylan@iici.no-ip.org> wrote:
Also note that the syntax is
v.drape [ -B | -C ] in=trails output=trails3d rast=elev_meters
where the -B or -C refere to bilinear or cubic interpolation, default is
nearest neighbor.
OK, it is better to use -b,-c (lower case) flags, it is standard in GRASS.
But probably the best would be an option
method=[nearest|bilinear|cubic]
it is better to use an option to select from 3 values.
> Also note that the syntax is
> v.drape [ -B | -C ] in=trails output=trails3d rast=elev_meters
>
> where the -B or -C refere to bilinear or cubic interpolation,
> default is nearest neighbor.
OK, it is better to use -b,-c (lower case) flags, it is standard in
GRASS. But probably the best would be an option
method=[nearest|bilinear|cubic]
it is better to use an option to select from 3 values.
I think the -B and -C comes from v.sample. Change to an option there
too? (but leave in flags for now with a G_warning() so old scripts don't
break?)
im using a debian gnu-linux system (a simply mepis). iv installed the postgis package to use my postgre database lika a geographical DB, but now i have some problems:
trying to use the pg.postgisdb command for crate a new geo-db the output is:
GRASS 6.0.0 (pat):~ > pg.postgisdb -c test -h redstar -U luca -p 5432
Create database. Expecting following settings:
libpostgis.so.x.x dir: '/usr/local/pgsql/lib/contrib/'
plpgsql.so file : '/usr/local/pgsql/lib/plpgsql.so'
postgis.sql file : '/postgis.sql'
CREATE DATABASE
ERROR: could not access file "/usr/local/pgsql/lib/plpgsql.so": No such fileor directory
ERROR: function plpgsql_call_handler() does not exist
cat: /postgis.sql: No such file or directory
GRASS 6.0.0 (pat):~ >
This sounds VERY interesting. I can see a number of potential uses.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
From: Dylan Beaudette <dylan@iici.no-ip.org>
Date: Wed, 28 Sep 2005 14:20:29 -0700
To: Radim Blazek <radim.blazek@gmail.com>
Cc: Markus Neteler <neteler@itc.it>, <GRASSLIST@baylor.edu>
Subject: [GRASSLIST:8447] New GRASS Module: v.drape
Hi Radim and Markus,
Per Radim's suggestions I have created a new module called v.drape, wich will
create a 3D vector from a 2D vector and an elevation surface. Vector code was
borrowed from v.split, and raster sampling was based on code from v.sample.
Attached is an initial version of the source code, which seams to work fine
for lines. I still need to add support for points, and add some error
checking. Also, I have commented using Doxygen-style formatting, for later
programmer's manual creation. If this looks ok to you guys, I will write up
the description.html as soon as I can.
The new command works like this:
v.drape -C in=trails output=trails3d rast=elev_meters
A new 3D vector file is created, with a copy of the original DB table.
Cheers,
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
On Wednesday 28 September 2005 12:09 am, Radim Blazek wrote:
Hi,
I intended
v.drape input=my2d rast=dem output=my3d
v.out.pov input=my3d
Would it be a problem to create one more map?
But if you put most of functionality to
G_sample_raster(raster_file, method, point_x, point_y)
it is ok for me also to add it to v.out.pov.
Also it would be nice if you could contribute also v.drape
(should be simple with G_sample_raster).
Note that output of v.drape (or v.to.3d?) can be also used in
nviz.