[Freegis-list] Newbie Question
Markus Neteler
neteler at itc.it
Mon Feb 27 15:15:48 CET 2006
On Mon, Feb 27, 2006 at 01:10:07PM +0200, Ari Jolma wrote:
> Markus Neteler kirjoitti:
> >
> > GRASS comes with a prototype SWIG API
> > http://mpa.itc.it/markus/grass61progman/swig/main.html
> > which I would like to see extended. This could become
> > the backbone to such a query which is simply the 'r.what'
> > command in GRASS. Wrapping 'r.what' in SWIG, a SWIG-PHP
> > interface could do what you need.
>
> Markus,
>
> Why aren't the Swig interface files etc. are not on this page? Is it
> because they are not .c or .h files? Where can I get them?
Ari,
the files are not on this page because they are stored
in GRASS-CVS. But I have added related links now (thanks
for the suggestion):
http://mpa.itc.it/markus/grass61progman/swig/main.html
> In fact I think I'd like to continue on this work a bit. I've tried to
> think a way to get Grass' capability to my Perl-CLI/GUI, and probably
> working on this is the best way. I'd like to create some kind of
> translator, which would make Grass command line functions easy to wrap
> with Swig.
Sounds great. There is one thing which I discussed with Howard
Butler at Chicago recently: The GRASS code should not be
replicated in the SWIG interface. This will require changes
in the GRASS code, in a sense, that main procedures (parameter
definitions etc) are separated from the real algorithm.
This is unfortunately not the case for the example (r.slope.aspect).
I am happy to get suggestions how to change the code in GRASS
to be easier/better wrapped with SWIG.
> Can Grass use geodata via GDAL? Or is it only the other way around,
> i.e., GDAL can open Grass data?
Both, I think:
- GRASS imports external data via GDAL/OGR (r.in.gdal/v.in.ogr)
- GDAL/OGR can read data via GDAL-OGR-GRASS plugin
So it may be an idea to wrap r.in.gdal and/or v.in.ogr into
GRASS-SWIG. The someone could remotely import data (even
create a new "location" which is the GRASS project) and work
on these data from outside via SWIG. Results can be read
directly via GDAL-OGR-GRASS plugin, e.g. in Mapserver.
Like this GRASS operates as GIS analysis backbone.
Markus
> Ari
>
>
> >
> > Markus
> >
> --
> Prof. Ari Jolma
> Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
> Teknillinen Korkeakoulu / Helsinki University of Technology
> tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
> Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma
--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
More information about the Freegis-list
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)