[GRASSLIST:4091] Re: dynamic modeling advice? II

Radim Blazek blazek at itc.it
Thu Jul 18 04:02:50 EDT 2002


On Wednesday 17 July 2002 07:01 pm, Alex Thorn wrote:
> I'm still pretty new to programming and GIS in
> general, as well as GRASS specifically, so pleas
> forgive me if I have trouble understanding exactly
> what you mean.  I am currently using GRASS43 for my
> project.  Is the concensus that it would be worthwhile
> for me to switch to GRASS50 at minimum?

I think so, most users use 5.0, see:
http://grass.itc.it/announces/grass_questionnaire_2002_synthesis.html

> The idea of fast vector manipulation is interesting to
> me, but I'm wondering how easy it would be to export
> the results in an ascii format, so that it could be
> read by the C program that is currently the core of
> my model.

Why should be ascii export problem? But it isn't necessary.
If you want to use GRASS only as GIS part of your model
(and do not need GIS-independent intermediate format), 
you can write it as GRASS module and read/write directly
GRASS files.

> > (i run test now: 8s/340000 lines; i think, it was
> > about 3h in grass50)
>
> What were you testing?  Are these lines of a GRASS
> script?

No, it is number of lines in vector file and time of v.build
(v.support). 

> This looks like C code.  I'm a bit confused as to
> how this would fit together with GRASS.

GRASS is written in C, so it fit together very well.

>  Would this
> code need to be added to the actual GRASS source code?

This code may be your custom GRASS module. For compilation 
you need GRASS sources.

> I haven't actually figured out how to compile GRASS
> from the source, and have been using precompiled
> binaries.  Should I try to work on learning how to
> compile from source, or is that more trouble than it
> is worth (I note that I would also have to compile
> from source if I was going to use GRASS51 at all: the
> binaries are evidently not yet available).

Compilation should be easy (./configure, make) but you need to learn
how to write grass module - easy way is to copy and modify existing
module. 

Radim



More information about the grass-user mailing list