[GRASS-dev] GsoC2012: High level map interaction with python
Pietro
peter.zamb at gmail.com
Thu Apr 5 18:28:19 EDT 2012
Hi Sören,
2012/4/5 Sören Gebbert <soerengebbert at googlemail.com>:
... [snip]
>> Would you be interested in being my mentor?
>
> I would like to be your Mentor in this project. But actually i do not
> know the GSoC procedure in detail, maybe an
> experienced mentor may help me with this?
>
> But i have to warn you, in my opinion the Python interface should use
> the C-library function using the ctype-wrapper
> to implement higher level functionality. That means you need to have a
> deep understanding about the core libraries
> and how to use the library functions, since the ctype interface simply
> wraps the C-library functions. But don't worry,
> i have some knowledge about this and can help you in deep detail.
I'm happy to learn and to understand more on C-library functions!
:-)
> I would suggest to focus first on the core and raster libraries and
> all of its features. That means to create Python classes
> for important concepts like modules, raster maps, rows, regions,
> categories, color, segmentation and so on.
> Covering this we can think about the Pythonization of these concepts.
We are going to implement something new, therefore I would like to be
consistent, or at least more consistent that we can with GRASS and
Python.
I think that using API examples to make test/doctest is one of the
best tool to highlight weakness and limits of the implementation.
Furthermore we can use this material as a starting point for the
development.
> Very simple example:
...[snip]
> slap = obj.module("r.slope.aspect")
> slap.in.elevation = "elevation" # string
> slap.out.slope = "tmp" # string
> slap.flag.a = True # boolean
> slap.flag.overwrite = True # boolean
> slap.run()
I like your example, I think is clearer than what I wrote in the wikipage!
The only thing that I would like to make it different is the part on
the `module`
your idea it seems to be easier to implement, but it is more verbose...
But perhaps there is not a better solution...
> With the focus on core and raster functionality i would say this is
> doable in a GSoC project.
Ok I'm going to modify the project page on melange to follow your advice.
> What do you think?
I think that you are pushing the idea forward and in the right direction.
Thanks
Best regards
Pietro
More information about the grass-dev
mailing list