[Freegis-list] Newbie Question
Ari Jolma
ari.jolma at tkk.fi
Mon Feb 27 15:52:32 CET 2006
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.
Ari
More information about the Freegis-list
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)