[GRASS-dev] python port of r.denoise (testing required)

Hello all.

I just finished porting r.denoise to python, but before uploading it to the add-ons, I would welcome any testing.

The module is available here: https://github.com/CarlosGrohmann/grass_gis/tree/master/r_denoise_py

thanks

Carlos

--
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.

On Fri, Dec 2, 2016 at 4:22 PM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:

Hello all.

I just finished porting r.denoise to python, but before uploading it to the
add-ons, I would welcome any testing.

The module is available here:
https://github.com/CarlosGrohmann/grass_gis/tree/master/r_denoise_py

Please add a Makefile as well.
In addition, you may consider to add the download and compilation of
the needed mdenoise to the Makefile.

Markus

--
Markus Neteler
http://www.mundialis.de - free data with free software
http://grass.osgeo.org
http://courses.neteler.org/blog

I added a Makefile (adapted from r.roughness.vector), and also went and uploaded to SVN.

I’m not used to commiting to SVN so this is what I did:

- checked out the add-ons with svn
- created r.denoise dir
- added the files
- changed description.html to r.denoise.html
- remembered that I should’ve run module_svn_propset.sh, so I did this
- commited the changes

Then I tried to install it with g.extension but it didn’t worked:

g.extension r.denoise
Fetching <r.denoise> from GRASS GIS Addons repository (be patient)...
Compiling...
/var/folders/y9/mnj7kbf10pl0zfs74d03sz940000gn/T/grass7-guano-54185/tmptOIYEY/r.denoise/docs/html/r.denoise.html:75:0: Error (IndexError('pop from empty list',)): <em><b>r.denoise</em></b> requires that <em>mdenoise</em>, the executable version of Sun et al.'s (2007) denoising algorithm, is available on the $PATH. <em>mdenoise</em> can be compiled and installed as follows:

make: *** [/var/folders/y9/mnj7kbf10pl0zfs74d03sz940000gn/T/grass7-guano-54185/tmptOIYEY/r.denoise/docs/man/man1/r.denoise.1] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
GRASS 7.2.0svn (latlong):~ >

The module itself was installed (and runs fine), but not the html help page. What did I miss?

thanks

Carlos

--
Prof. Carlos Henrique Grohmann
Institute of Energy and Environment - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

carlosgrohmann.com
http://orcid.org/0000-0001-5073-5572
________________
Can’t stop the signal.

On 5 Dec 2016 14:42 -0200, Markus Neteler <neteler@osgeo.org>, wrote:

On Fri, Dec 2, 2016 at 4:22 PM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:
> Hello all.
>
> I just finished porting r.denoise to python, but before uploading it to the
> add-ons, I would welcome any testing.
>
> The module is available here:
> https://github.com/CarlosGrohmann/grass_gis/tree/master/r_denoise_py

Please add a Makefile as well.
In addition, you may consider to add the download and compilation of
the needed mdenoise to the Makefile.

Markus

--
Markus Neteler
http://www.mundialis.de - free data with free software
http://grass.osgeo.org
http://courses.neteler.org/blog

Hi,

2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:

The module itself was installed (and runs fine), but not the html help
page. What did I miss?

there was syntax error, fixed in r70008. Ma

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

On Mon, Dec 5, 2016 at 9:23 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:

The module itself was installed (and runs fine), but not the html help
page. What did I miss?

Also for addons, please follow the documentation guidelines:
https://trac.osgeo.org/grass/wiki/Submitting/Docs

(I think that Martin already fixed most of it)

Markus

Ok,

I used the html from the old module. Hadn’t realized that there was a specific order for things in the html. Sorry.

Thanks for the fix, Martin.

Carlos

On 5 Dec 2016 20:13 -0200, Markus Neteler <neteler@osgeo.org>, wrote:

On Mon, Dec 5, 2016 at 9:23 PM, Martin Landa <landa.martin@gmail.com> wrote:
> Hi,
>
> 2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:
> > The module itself was installed (and runs fine), but not the html help
> > page. What did I miss?

Also for addons, please follow the documentation guidelines:
https://trac.osgeo.org/grass/wiki/Submitting/Docs

(I think that Martin already fixed most of it)

Markus

Thank you for rewriting this, here is couple of brief observations.
The epsg option is currently required in the code, although it
shouldn't be necessary if you are in projected system. So it fails if
you don't specify it. Also it should probably respect nulls in the
input, now it results in -4e-06 instead of nulls.

Best,

Anna

On Mon, Dec 5, 2016 at 5:16 PM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:

Ok,

I used the html from the old module. Hadn’t realized that there was a
specific order for things in the html. Sorry.

Thanks for the fix, Martin.

Carlos

On 5 Dec 2016 20:13 -0200, Markus Neteler <neteler@osgeo.org>, wrote:

On Mon, Dec 5, 2016 at 9:23 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:

The module itself was installed (and runs fine), but not the html help
page. What did I miss?

Also for addons, please follow the documentation guidelines:
https://trac.osgeo.org/grass/wiki/Submitting/Docs

(I think that Martin already fixed most of it)

Markus

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

Thank you for rewriting this, here is couple of brief observations.

Additionally In
https://wingrass.fsv.cvut.cz/grass73/x86_64/addons/grass-7.3.svn/logs/r.denoise.log

[...]
ERROR: pyproj not found, install it first: pip install pyproj

maybe some kind of lazy importing of pyproj is needed that the script
compiles at in winGRASS.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/python-port-of-r-denoise-testing-required-tp5298395p5298758.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Thanks for testing it Anna.

I commited some changes: EPSG code is not required in a projected location and null values are repected.

Carlos

On 6 Dec 2016 02:16 -0200, Anna Petrášová <kratochanna@gmail.com>, wrote:

Thank you for rewriting this, here is couple of brief observations.
The epsg option is currently required in the code, although it
shouldn't be necessary if you are in projected system. So it fails if
you don't specify it. Also it should probably respect nulls in the
input, now it results in -4e-06 instead of nulls.

Best,

Anna

On Mon, Dec 5, 2016 at 5:16 PM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:
> Ok,
>
> I used the html from the old module. Hadn’t realized that there was a
> specific order for things in the html. Sorry.
>
> Thanks for the fix, Martin.
>
> Carlos
>
>
>
> On 5 Dec 2016 20:13 -0200, Markus Neteler <neteler@osgeo.org>, wrote:
>
> On Mon, Dec 5, 2016 at 9:23 PM, Martin Landa <landa.martin@gmail.com> wrote:
>
> Hi,
>
> 2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:
>
> The module itself was installed (and runs fine), but not the html help
> page. What did I miss?
>
>
> Also for addons, please follow the documentation guidelines:
> https://trac.osgeo.org/grass/wiki/Submitting/Docs
>
> (I think that Martin already fixed most of it)
>
> Markus
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, Dec 6, 2016 at 7:34 AM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:

Thanks for testing it Anna.

I commited some changes: EPSG code is not required in a projected location
and null values are repected.

Great, thank you, I will test later.

Anna

Carlos

On 6 Dec 2016 02:16 -0200, Anna Petrášová <kratochanna@gmail.com>, wrote:

Thank you for rewriting this, here is couple of brief observations.
The epsg option is currently required in the code, although it
shouldn't be necessary if you are in projected system. So it fails if
you don't specify it. Also it should probably respect nulls in the
input, now it results in -4e-06 instead of nulls.

Best,

Anna

On Mon, Dec 5, 2016 at 5:16 PM, Carlos Grohmann
<carlos.grohmann@gmail.com> wrote:

Ok,

I used the html from the old module. Hadn’t realized that there was a
specific order for things in the html. Sorry.

Thanks for the fix, Martin.

Carlos

On 5 Dec 2016 20:13 -0200, Markus Neteler <neteler@osgeo.org>, wrote:

On Mon, Dec 5, 2016 at 9:23 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2016-12-05 21:14 GMT+01:00 Carlos Grohmann <carlos.grohmann@gmail.com>:

The module itself was installed (and runs fine), but not the html help
page. What did I miss?

Also for addons, please follow the documentation guidelines:
https://trac.osgeo.org/grass/wiki/Submitting/Docs

(I think that Martin already fixed most of it)

Markus

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

Carlos Grohmann-2 wrote

Thanks for testing it Anna.

I commited some changes: EPSG code is not required in a projected location
and null values are repected.

Carlos

just have also a look at

https://wingrass.fsv.cvut.cz/grass73/x86_64/addons/grass-7.3.svn/logs/r.denoise.log

/addons/r.denoise/scripts/r.denoise.py --html-description < /dev/null | grep
-v '</body>\|</html>' > r.denoise.tmp.html ; fi
ERROR: pyproj not found, install it first: pip install pyproj
       (https://jswhit.github.io/pyproj)
/c/msys64/usr/src/grass_trunk/include/Make/Html.make:14: recipe for target
'r.denoise.tmp.html' failed
make: *** [r.denoise.tmp.html] Error 1
rm r.denoise.tmp.html

76 # pyproj
77 try:
78 import pyproj
79 except ImportError:
80 grass.fatal(_("pyproj not found, install it first: pip install pyproj
(https://jswhit.github.io/pyproj)"))

maybe this should go into

143 def main():

that compiling works at least if pyproj isn't installed?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/python-port-of-r-denoise-testing-required-tp5298395p5299010.html
Sent from the Grass - Dev mailing list archive at Nabble.com.