[GRASS-dev] Python-based v.mapcalc to Addons

Hi Soeren,

I’ve tried v.mapcalc from Thomas’ GSoC and I think it should go at least to Addons. Does one of you want to commit it or should I do that? Some, rather trivial, changes are need to make it work (attached), I can apply them later if you want.

I also suggest removing the v.mapcalc which is now in addons. Perhaps the functionality is different but since it was not finished, there is no functionality which can be used. Unless somebody will work on it soon, I don’t see a reason to keep it there. (Alternatively, it can be renamed.)

Best,

Vaclav

(attachments)

vmapcalc.patch (8.43 KB)

···

On Tue, Oct 13, 2015 at 3:15 AM, Sören Gebbert <soerengebbert@googlemail.com> wrote:

Hi,
the GSoC implementation of v.mapcalc is still available:
https://code.google.com/p/grass-gis-temporal-algebra/source/browse/#svn%2Ftrunk%2Fv.mapcalc

However, the approach in the GSoC v.mapcalc is very different from the
v.mapcalc addon from 2002.
The algebraic expressions are applied to whole vector maps, rather
than single points, list of points, lines or polygons.

Best regards
Soeren

2015-10-13 3:53 GMT+02:00 Vaclav Petras <wenzeslaus@gmail.com>:

On Mon, Oct 12, 2015 at 6:24 AM, Glynn Clements <glynn@gclements.plus.com>
wrote:

Markus Neteler wrote:

<p.vanbreugel@gmail.com> wrote:

Sorry for the late follow up. The add-on installs now. When trying to
run
it, however, nothing happens.

It does not have a parser (yet?), so I suppose it reads from stdin.

Yes.

But it doesn’t have any code to read or write GRASS vectors, either.
v.mapcalc appears to be a work-in-progress which hasn’t actually made
noticeable progress since it was added.

Then I suggest to remove it from the Makefile parent directory and also
disable it in the addons build scripts if there is something more needed
than r66406 [1] which is blacklisting it somehow already. It does not
fulfill what user would expect (at least some functionality). Those who want
to continue development will get it through svn.

I’m not sure happened [2] with the v.mapcalc implemented as a test case in
GSoC [3] and if the functionality can be still used. But this seems like a
good alternative to the code in addons.

Vaclav

[1] https://trac.osgeo.org/grass/changeset/66406
[2] https://lists.osgeo.org/pipermail/grass-dev/2013-October/065908.html
[3]
https://grasswiki.osgeo.org/wiki/GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS#v.mapcalc


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

+1

2016-01-05 8:47 GMT+01:00 Thomas Leppelt <thomas.leppelt@gmail.com>:

Hi Vaclav,

it would be nice, if you commit v.mapcalc to Addons.

Thanks

Thomas

On Tue, Jan 5, 2016 at 4:52 AM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Hi Soeren,

I've tried v.mapcalc from Thomas' GSoC and I think it should go at least
to Addons. Does one of you want to commit it or should I do that? Some,
rather trivial, changes are need to make it work (attached), I can apply
them later if you want.

I also suggest removing the v.mapcalc which is now in addons. Perhaps the
functionality is different but since it was not finished, there is no
functionality which can be used. Unless somebody will work on it soon, I
don't see a reason to keep it there. (Alternatively, it can be renamed.)

Best,
Vaclav

On Tue, Oct 13, 2015 at 3:15 AM, Sören Gebbert
<soerengebbert@googlemail.com> wrote:

Hi,
the GSoC implementation of v.mapcalc is still available:

https://code.google.com/p/grass-gis-temporal-algebra/source/browse/#svn%2Ftrunk%2Fv.mapcalc

However, the approach in the GSoC v.mapcalc is very different from the
v.mapcalc addon from 2002.
The algebraic expressions are applied to whole vector maps, rather
than single points, list of points, lines or polygons.

Best regards
Soeren

2015-10-13 3:53 GMT+02:00 Vaclav Petras <wenzeslaus@gmail.com>:
>
> On Mon, Oct 12, 2015 at 6:24 AM, Glynn Clements
> <glynn@gclements.plus.com>
> wrote:
>>
>> Markus Neteler wrote:
>>
>> > <p.vanbreugel@gmail.com> wrote:
>> > ...
>> > > Sorry for the late follow up. The add-on installs now. When trying
>> > > to
>> > > run
>> > > it, however, nothing happens.
>> >
>> > It does not have a parser (yet?), so I suppose it reads from stdin.
>>
>> Yes.
>>
>> But it doesn't have any code to read or write GRASS vectors, either.
>> v.mapcalc appears to be a work-in-progress which hasn't actually made
>> noticeable progress since it was added.
>
> Then I suggest to remove it from the Makefile parent directory and also
> disable it in the addons build scripts if there is something more
> needed
> than r66406 [1] which is blacklisting it somehow already. It does not
> fulfill what user would expect (at least some functionality). Those who
> want
> to continue development will get it through svn.
>
> I'm not sure happened [2] with the v.mapcalc implemented as a test case
> in
> GSoC [3] and if the functionality can be still used. But this seems
> like a
> good alternative to the code in addons.
>
> Vaclav
>
> [1] https://trac.osgeo.org/grass/changeset/66406
> [2]
> https://lists.osgeo.org/pipermail/grass-dev/2013-October/065908.html
> [3]
>
> https://grasswiki.osgeo.org/wiki/GRASS_GSoC_2013_Temporal_GIS_Algebra_for_raster_and_vector_data_in_GRASS#v.mapcalc
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

On 05/01/16 04:52, Vaclav Petras wrote:

Hi Soeren,

I've tried v.mapcalc from Thomas' GSoC and I think it should go at least
to Addons.

+1

Moritz

On Tue, Jan 5, 2016 at 2:47 AM, Thomas Leppelt <thomas.leppelt@gmail.com>
wrote:

it would be nice, if you commit v.mapcalc to Addons.

Done.

Rename v.mapcalc to v.feature.algebra and disable it:

https://trac.osgeo.org/grass/changeset/67492
https://trac.osgeo.org/grass/changeset/67493

Add and update Python v.mapcalc:

https://trac.osgeo.org/grass/changeset/67494
https://trac.osgeo.org/grass/changeset/67495
https://trac.osgeo.org/grass/changeset/67496

On Tue, Jan 5, 2016 at 4:52 AM, Vaclav Petras <wenzeslaus@gmail.com>
wrote:

I've tried v.mapcalc from Thomas' GSoC and I think it should go at least
to Addons. Does one of you want to commit it or should I do that? Some,
rather trivial, changes are need to make it work (attached), I can apply
them later if you want.

I also suggest removing the v.mapcalc which is now in addons. Perhaps the
functionality is different but since it was not finished, there is no
functionality which can be used. Unless somebody will work on it soon, I
don't see a reason to keep it there. (Alternatively, it can be renamed.)

Hi Martin,

I see that the Addons index page was compiled but don’t see any changes (there, in individual pages or in logs). Can you please look at that? I was changing the directory Makefile and renaming directories, so I’m not sure if this could cause something.

Vaclav

···

On Tue, Jan 5, 2016 at 10:49 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Tue, Jan 5, 2016 at 2:47 AM, Thomas Leppelt <thomas.leppelt@gmail.com> wrote:

it would be nice, if you commit v.mapcalc to Addons.

Done.

Rename v.mapcalc to v.feature.algebra and disable it:

https://trac.osgeo.org/grass/changeset/67492
https://trac.osgeo.org/grass/changeset/67493

Add and update Python v.mapcalc:

https://trac.osgeo.org/grass/changeset/67494
https://trac.osgeo.org/grass/changeset/67495
https://trac.osgeo.org/grass/changeset/67496

On Tue, Jan 5, 2016 at 4:52 AM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

I’ve tried v.mapcalc from Thomas’ GSoC and I think it should go at least to Addons. Does one of you want to commit it or should I do that? Some, rather trivial, changes are need to make it work (attached), I can apply them later if you want.

I also suggest removing the v.mapcalc which is now in addons. Perhaps the functionality is different but since it was not finished, there is no functionality which can be used. Unless somebody will work on it soon, I don’t see a reason to keep it there. (Alternatively, it can be renamed.)

Hi,

2016-01-06 5:50 GMT+01:00 Vaclav Petras <wenzeslaus@gmail.com>:

I see that the Addons index page was compiled but don't see any changes
(there, in individual pages or in logs). Can you please look at that? I was
changing the directory Makefile and renaming directories, so I'm not sure if
this could cause something.

right, `svn up` failed with

svn: Failed to add directory 'grass7/vector/v.mapcalc': an unversioned
directory of the same name already exists

Fixed. Ma

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

On 06/01/16 04:49, Vaclav Petras wrote:

On Tue, Jan 5, 2016 at 2:47 AM, Thomas Leppelt <thomas.leppelt@gmail.com
<mailto:thomas.leppelt@gmail.com>> wrote:

    it would be nice, if you commit v.mapcalc to Addons.

Done.

Great. This is a wonderful tool, thanks !

One observation: at the end g.rename is run with overwrite=TRUE, which means that v.mapcalc mimics the behaviour of the old r.mapcalc which just overwrote existing maps. Would it be possible to change this so that v.mapcalc has and --overwrite flag and does not just overwrite existing maps if this is not set ?

Moritz