[GRASSLIST:1123] Advise for first program in c

Grass users,

I am interested in trying to build a C program that
accesses GRASS and have a few questions (I'm not a
programmer).

I am interesting in writing a routine that traces the
profile of a river and builds an ascii table of x,y
coordinate pairs and columns of values associated with
user-supplied list of rasters. The idea is to trace a
river profile and dump out the associated variables
for each pixel on the river, say manning's n,
elevation, width, slope etc... Really though, it is
just a simple program to try in C.

First, do I need to have a full copy of the source
code for GRASS or can I work with a binary only
version and just link against the libraries I need
mentioned in the programmers manual? (I've never used
make before either so I don't understand that yet
either)

Any first time advise would be appreciated.

=====
--
David Finlayson
david_finlayson@yahoo.com
University of Washington
Box 351310
Seattle, WA 98195 - 1310

__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

Hi David,
I can't give an advice, but your routine sounds great. Are you thinking
to put it under GPL? How do you wanna define your "river"?
R.

Rado Bonk
Geography and Geology
UNO, Nebraska, 68182-0199,
rado@cosmos.unomaha.edu

On Mon, 13 Nov 2000, David Finlayson wrote:

Grass users,

I am interested in trying to build a C program that
accesses GRASS and have a few questions (I'm not a
programmer).

I am interesting in writing a routine that traces the
profile of a river and builds an ascii table of x,y
coordinate pairs and columns of values associated with
user-supplied list of rasters. The idea is to trace a
river profile and dump out the associated variables
for each pixel on the river, say manning's n,
elevation, width, slope etc... Really though, it is
just a simple program to try in C.

First, do I need to have a full copy of the source
code for GRASS or can I work with a binary only
version and just link against the libraries I need
mentioned in the programmers manual? (I've never used
make before either so I don't understand that yet
either)

Any first time advise would be appreciated.

=====
--
David Finlayson
david_finlayson@yahoo.com
University of Washington
Box 351310
Seattle, WA 98195 - 1310

__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

On Mon, Nov 13, 2000 at 10:26:25PM -0800, David Finlayson wrote:

Grass users,

I am interested in trying to build a C program that
accesses GRASS and have a few questions (I'm not a
programmer).

I am interesting in writing a routine that traces the
profile of a river and builds an ascii table of x,y
coordinate pairs and columns of values associated with
user-supplied list of rasters. The idea is to trace a
river profile and dump out the associated variables
for each pixel on the river, say manning's n,
elevation, width, slope etc... Really though, it is
just a simple program to try in C.

First, do I need to have a full copy of the source
code for GRASS or can I work with a binary only
version and just link against the libraries I need
mentioned in the programmers manual? (I've never used
make before either so I don't understand that yet
either)

Any first time advise would be appreciated.

I think you need the full source code. GRASS has it's own "make"
routine called "gmake[5]" that takes care of much of the dirty work.
There are some examples in the programming manual, as well as the source
code (which really can be invaluable).

Good Luck,
--
Eric G. Miller <egm2@jps.net>
"Time is Free"

Hello David

David Finlayson wrote:

First, do I need to have a full copy of the source
code for GRASS or can I work with a binary only
version and just link against the libraries I need
mentioned in the programmers manual? (I've never used
make before either so I don't understand that yet
either)

You will also need the include files, so getting the source code would
be your best bet.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!