ferrouswheel / mdig

MDiG - Modular Dispersal in GIS
Other
5 stars 1 forks source link

compatibility with recent GRASS version #23

Open rgommers opened 6 years ago

rgommers commented 6 years ago

Hi. The tests hang with GRASS 7.2 on Ubuntu 16.04. I'm not sure whether or not this repo is still maintained, but given the recent paper (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5648669/) I had expected it to work with a recent GRASS. Should it?

From the content in this repo, GRASS 6.4 is the latest one that MDiG has been tried with. It would be useful to document with which versions it's expected to work.

ferrouswheel commented 6 years ago

Thanks for reporting this. I have not actively worked on this project for several years. However I know of several labs that use MDiG and always encourage people to contribute pull requests.

dgpreatoni commented 6 years ago

Given that MDiG is one of the few spatially explicit population dynamics packages existing (see doi:10.1016/j.ecolmodel.2013.10.001 for a rather recent review/comparison), it could be interesting keeping it updated with current GRASS releases. Joel knows I tried to start working on the documentaiton and trying to fix compiling on GRASS7... perhaps it's time to start a more co-ordinated and joint effort... always with Joel approval, of course!

rgommers commented 6 years ago

Thanks for the quick replies @ferrouswheel and @dgpreatoni. From reading the literature it indeed seemed to me that MDiG is still quite relevant.

For trying out this package, what would you recommend? I could try and build GRASS 6.4 and its dependencies, or using it without GRASS involved (as in https://github.com/AudreyL/mdig-casestudy/blob/master/L.Dispar/mdig-notIntegratedInGrass.py). The latter would be nice, if that's a good way to use MDiG (I'm not a GIS person).

If MDiG turns out to be useful for me, I can justify putting some more time in and looking at build issues.

dgpreatoni commented 6 years ago

Perhaps the most "lightweight" solution could be the "python only stub" that Audrey set up. The alternative I'm using now is the demoniche package in R, but being a GIS person (e.g. I call GRASS GIS from R) I found demoniche a tad limiting, although good.

jdhollan commented 6 years ago

Hello Damiano and Joel, I haven’t used MDiG yet, but see the value is keeping it ready to do so. I use GIS, but don’t code beyond R. If there is a way I can help the community, just let me know. Cheers.

From: Damiano G. Preatoni [mailto:notifications@github.com] Sent: Tuesday, January 30, 2018 3:01 AM To: ferrouswheel/mdig mdig@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [ferrouswheel/mdig] compatibility with recent GRASS version (#23)

Given that MDiG is one of the few spatially explicit population dynamics packages existing (see doi:10.1016/j.ecolmodel.2013.10.001 for a rather recent review/comparison), it could be interesting keeping it updated wit hcurrent GRASS releases. Joel knows I tried to start working on the documentaiton and trying to fix compiling on GRASS7... perhaps it's time to start a more co-ordinated and joint effort... always with Joel; s approval, of course!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ferrouswheel/mdig/issues/23#issuecomment-361506489, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGVn-fLfWfU4QivbLvxw0DXM2xMaGPL1ks5tPsxWgaJpZM4RwPVS.

ferrouswheel commented 6 years ago

From a quick review it looks like @AudreyL's script is just taking the idea of MDiG and running a similar simulation set up. It doesn't use DispersalML model descriptions or integrate with any of the statistical reporting and analysis tools that MDiG tries to help with (although if I'm overlooking something please correct me!).

The ideal situation would be for MDiG to support running outside of GRASS, and allow model stages to be defined by python functions instead of GRASS commands like r.mdig.kernel. A DispersalML file could also indicate that a particular stage is a GRASS command, and MDiG would take care of exporting to a raster map and importing the resulting map before the next stage is run.

For making MDiG work with GRASS 7 - I am unfamiliar with any changes in GRASS 7.0, and because it's a major release I'm not sure how much of the environmental assumptions have changed? At the least each of the modules in grass-modules should be checked. Unfortunately while there are some tests in place for MDiG, I never got a chance to implement a test suite for the grass modules so this would be a manual process.

ferrouswheel commented 6 years ago

So it looks like GRASS7 has some great python API support. This will probably allow a lot of old MDiG code used as GRASS scaffolding to be deleted. It will also make it easier to write extensions in python via numpy arrays.

Unfortunately GRASS7 changes the C API significantly, so there is a bunch of work to restore the old C r.mdig modules. So the question is whether it is worth porting these, or to just rewrite them in python.

The tests hang with GRASS7 due to the test dropping into python debug mode. You can see the details with nosetests -sv. I haven't investigate why yet.