[GRASS-dev] GSoC proposal "Higher level API for C and C++" : need for discussion

Markus Metz markus.metz.giswork at gmail.com
Thu Feb 2 00:22:00 PST 2017


On Wed, Feb 1, 2017 at 10:46 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
>
> On Wed, Feb 1, 2017 at 3:24 PM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:
>>
>> I don't really agree with the idea that
>>
>> "Unfortunately, its [GRASS'] development is stagnating because of small
interest
>> from fresh and young developers. This is partially caused by the fact
that its design and
>> concepts are overcome by modern practices in a software development."
>>
>> I do not see GRASS stagnating. And even though GRASS uses an "old"
language,
>
>
> I think C is fine and that might be more clear now than in 2008, but C++
is popular too.

C++ is more problematic in terms of portability and robustness over time,
have a look at the revision log of e.g. r.terraflow and the iostream
library.

> However, the motivation for GSoC is make writing of modules in C and C++
easier. We may discuss if "development is stagnating because of small
interest" is true or not, but for sure we can have better interface which
would attract more people.

Then the project should determine what is "better". This could be a project
where a concept is going to be developed without writing a single line of
code. The main objective would then be to first identify what is bad or too
complicated and how to improve on it.

> More pressing problem however are the modules which use variants of
all-in-memory and tiling-on-disk raster reading modes. I'm not sure what is
the state now, because MarkusM fixed a lot of those, but some addons were
not included into core because of custom segment libraries (and even now
they have custom all-in-memory implementations).

There are only a few modules requiring random access and external memory
(e.g. but not only tiling on disk). IMHO, random access and usage of
external memory are special cases, and I don't see how a higher-level API
would help with these special cases.

All-in-memory processing is so simple that any API would IMHO make things
more complicated.

The interface to the segment library is pretty simple: you need only
Segment_open(), Segment_put(), Segment_get(), Segment_close().

Maybe it would help if there would a better description about the
differences in the tiling-on-disk methods available in GRASS, i.e. the
segment library, the read-only cache used by r.proj, and the rowio library.

>
>> I imagine that it's unpleasant if all you believe in is OO, but that
doesn't necessarily make OO the naturally best way to go... :-)
>
>
> Similarly to Python API, OOP is not the only thing we should focus on.
C++ is a multiparadigm language and OOP is just part of it (e.g. templates
are kind of big), plus there are different levels of doing OOP ("C with
classes" versus more complicated OOP). So yes, the student should be
familiar with more than just OOP.

Note that the vast majority of portability and compatibility issues arises
from Python and C++.

Maybe this proposal addresses two different things that could be kept
separated:
1) some higher-level C and C++ API
2) random read (and write) access to raster cells.

For both cases, a more detailed description of the objective would be
helpful.

my2c

Markus M
>
>>
>>
>> b) I'm afraid it's too big of a project for GSoC and that we would put
the student in an uncomfortable position.
>
>
> It should be much smaller than GAL project and it should be mostly
additions to API, not rewriting the libraries.
>
> That's at least my idea. I hope this clarifies it a bit.
>
> Vaclav
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170202/b41625fe/attachment.html>


More information about the grass-dev mailing list