Re: Newbie Question
Markus Neteler <[email protected]>
| Newsgroups | gmane.comp.gis.freegis |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 27, 2006 at 04:52:32PM +0200, Ari Jolma wrote: > Markus Neteler kirjoitti: > > 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. > > > I'm hoping that it is possible to write a translator, which automates > this step, i.e., the example r_slope_aspect.c would be generated with > that translator. If it needs a full C parser, then it gets complicated > however. It's a bit similar to what Swig itself does when it creates the > wrapper C code. > > > > > >> 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. > > > The ultimate tool would also have R spatial capabilities among other > things... The problem is how to move the data from one environment to > the other. Probably that could be organized through GDAL/OGR, i.e., all > tools may have their native formats but should include GDAL/OGR i/o. I always wanted to look at the R to C interface (embedded R or however that's called to launch R tasks from the GRASS side). From the other side: there is an R-GDAL extension as well. So: the software projects (start to) communicate... :-) Markus