Opened 5 years ago

Closed 2 years ago

Last modified 2 years ago

#2426 closed enhancement (wontfix)

add r.surf.nnbathy to the core code of GRASS 7.1

Reported by: bhlevca Owned by: grass-dev@…
Priority: major Milestone: 7.2.2
Component: Addons Version: unspecified
Keywords: nnbathy Cc: lazaa
CPU: Unspecified Platform: Unspecified

Description

I find this script much faster and gives better results that r.surf.contour.

I am not sure if there are licensing problems with nnbathy (https://code.google.com/p/nn-c/) as it is a MIT license, but my understanding is that it should be possible.

I recently copied manually the script from the Grass6 add on repositories into the scripts directory of the Grass7.1 installation directory. I also compiled nnbathy from the above sources. The Makefile in the grass7 addons did not work although I had the grass6 addons installed in parallel. Probably that needs fixing as well as a temporary measure until nnbathy is properly integrated.

It worked flawlessly in grass 7.1. The result of a 6000x 10000 nodes was given in less than one minute. The r.surf.contour gave me a worse result in 192 minutes! That's more than 3 hours and that happened only after I lowered the resolution from res=2 to res=6. With res=1 in the g.region the r.surf.contour did not advance at all after 2 hours so I had to cancel. In addition the quality is not so great from r.surf.contour, especially if you have complex shapes. I believe many people would benefit from this triangulation (nnbathy) method rather than using the linear interpolation method of r.surf.contour.

Please consider of adding r.surf.nnbathy to the main repository. Thanks

Change History (12)

comment:1 Changed 5 years ago by annakrat

link to related mailing list discussion

comment:2 Changed 5 years ago by bhlevca

I read that.

However, I think that it is better to have a tracked item rather than discussions on a list, which are more difficult to find and probably lead nowhere because there is no one assigned to deal with it.

Thanks for the reply. I did my job with it, but using hacks and chasing information on the net. Having it all in a common place would make more sense. I thought that by raising the issue it would life easier to many people.

comment:3 Changed 5 years ago by martinl

Cc: lazaa added
Keywords: nnbathy added

comment:4 in reply to:  description ; Changed 5 years ago by martinl

Replying to bhlevca:

I am not sure if there are licensing problems with nnbathy (https://code.google.com/p/nn-c/) as it is a MIT license, but my understanding is that it should be possible.

From https://code.google.com/p/nn-c/source/browse/nn/LICENSE it doesn't seems to me that it's MIT licence (?)

I recently copied manually the script from the Grass6 add on repositories into the scripts directory of the Grass7.1 installation directory. I also compiled nnbathy from the above sources.

Please try out new modules which have been recently rewritten from Bash to Python by lazaa. You can install them via g.extension

g.extension m.surf.nnbathy

which installs two new addon modules: r.surf.nnbathy and v.surf.nnbathy.

comment:5 in reply to:  4 Changed 5 years ago by martinl

Replying to martinl:

From https://code.google.com/p/nn-c/source/browse/nn/LICENSE it doesn't seems to me that it's MIT licence (?)

sorry, it's MIT licence as visible from https://code.google.com/p/nn-c/

comment:6 Changed 3 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:7 Changed 3 years ago by neteler

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:8 Changed 2 years ago by martinl

Milestone: 7.2.17.2.2

comment:9 Changed 2 years ago by martinl

Resolution: wontfix
Status: newclosed

There is no activity several years, closed as wontfix.

comment:10 Changed 2 years ago by bhlevca

That's bad. This is such an useful function. Perhaps reconsider?

In any case, nn-c has changed its home to https://github.com/sakov/nn-c

Last edited 2 years ago by bhlevca (previous) (diff)

comment:11 in reply to:  10 ; Changed 2 years ago by marisn

Replying to bhlevca:

That's bad. This is such an useful function. Perhaps reconsider?

In any case, nn-c has changed its home to https://github.com/sakov/nn-c

It is not so easy as nn-c depends on Triange which is not a free software. Thus it would be necessary to rewrite parts of nn-c to use different triangulation code i.e. from v.voronoi module. Feel free to provide code to remove Triange dependency from nn-c and then it can be integrated into GRASS GIS as nn-c license is compatible with GPL.

comment:12 in reply to:  11 Changed 2 years ago by martinl

Replying to marisn:

In any case, nn-c has changed its home to https://github.com/sakov/nn-c

It is not so easy as nn-c depends on Triange which is not a free software. Thus it would be necessary to rewrite parts of nn-c to use different triangulation code i.e. from v.voronoi module. Feel free to provide code to remove Triange dependency from nn-c and then it can be integrated into GRASS GIS as nn-c license is compatible with GPL.

There was also attempt to use CGDAL (see Adam Laza bachelor thesis from 2015, sorry in Czech only (1)). There were some performance problems with CGAL as far as I remember. The source code of CGDAL-based experimental module v.surf.nn is available online (2).

(1) http://geo.fsv.cvut.cz/proj/bp/2015/adam-laza-bp-2015.pdf#page=55

(2) http://geo.fsv.cvut.cz/proj/bp/2015/adam-laza-bp-2015.tar.gz

Last edited 2 years ago by martinl (previous) (diff)
Note: See TracTickets for help on using tickets.