[GRASS-dev] about SWIG Python interface...

I'm very much interested to the SWIG Python interface, as I'm
considering some investments to do with Grass functionalities. I'm
going to test the methods used by JGrass to interface Java with Grass
native commands, but I think it would be a great improvemente to
support it for Python too, as many non-programmer users use it (also
the ones coming from ArcGIS world!).

The question is: as Martin says, it's still in a "pre-alpha" state,
but do you think it will be developed more and supported?

Is the work done by Alessandro Frigeri (Univeristy of Perugia), to
implement a SWIG/Python interface [1], already included in the actual
code?

Giovanni

[1] http://www.foss4g2006.org/materialDisplay.py?contribId=136&sessionId=48&materialId=slides&confId=1

G. Allegri wrote:

I'm very much interested to the SWIG Python interface, as I'm
considering some investments to do with Grass functionalities. I'm
going to test the methods used by JGrass to interface Java with
Grass native commands, but I think it would be a great improvemente
to support it for Python too, as many non-programmer users use it
(also the ones coming from ArcGIS world!).

The question is: as Martin says, it's still in a "pre-alpha" state,

well, it basically works, AFAICT. So I'd call it in mid-alpha state.
:slight_smile:

but do you think it will be developed more and supported?

it's a loop: it gets developed more once it is working well and more
people are using it. my advice is to try it and see for yourself!

Start with reading swig/python/README and:
cd swig/python
make

and see what happens. if there are build problems they are probably
easy to fix.

After it builds, try the example found in the README and the ones in
the GRASS Wiki python pages linked from my last m.distance post.

What GRASS lib fns are you interested in using?

Is the work done by Alessandro Frigeri (Univeristy of Perugia), to
implement a SWIG/Python interface [1], already included in the
actual code?

...

[1]

http://www.foss4g2006.org/materialDisplay.py?contribId=136&sessionId=48&materialId=slides&confId=1

I don't know, but I don't think so.

Hamish

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

G. Allegri wrote:

I'm very much interested to the SWIG Python interface, as I'm
considering some investments to do with Grass functionalities. I'm
going to test the methods used by JGrass to interface Java with
Grass native commands,

Oh, just like there is already swig/python and swig/perl for GRASS
there could be swig/java too if someone wanted to work on that.
  http://www.swig.org/Doc1.3/Java.html

How does JGrass do it now? Do they link to the GRASS C API or just
modules? (the modules generally give enough low level control to not
need to use the C API much)

but I think it would be a great improvemente to support it for
Python too, as many non-programmer users use it

I am encouraged for the world by the many hints that Python may become
a de facto scripting standard for geo-scientists. It would be a Good
Thing.

Hamish

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Hi,

2008/3/3, G. Allegri <giohappy@gmail.com>:
[snip]

  The question is: as Martin says, it's still in a "pre-alpha" state,
  but do you think it will be developed more and supported?

  Is the work done by Alessandro Frigeri (Univeristy of Perugia), to
  implement a SWIG/Python interface [1], already included in the actual
  code?

not yet, I hope it will be possible soon(?). It would improve GRASS
Swig/Python interface a lot.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

I talked to Alessandro. He will be very pleased to release its work.
Anyway it won't be possible before the end of April, as he's very busy
with travels outside Italy.
In the meanwhile he shall try to produce some documentation about it.

Bye,
Giovanni

2008/3/3, Martin Landa <landa.martin@gmail.com>:

Hi,

2008/3/3, G. Allegri <giohappy@gmail.com>:
[snip]

> The question is: as Martin says, it's still in a "pre-alpha" state,
> but do you think it will be developed more and supported?
>
> Is the work done by Alessandro Frigeri (Univeristy of Perugia), to
> implement a SWIG/Python interface [1], already included in the actual
> code?

not yet, I hope it will be possible soon(?). It would improve GRASS
Swig/Python interface a lot.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *