[Qgis-user] HomeRange plugin updated
Hi all. Thanks to Anne, the HomeRange plugin is now updated. It should show off automagically the next time you open QGIS. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
The plugin fails to recognize loaded point layers on OS X with rpy2, R 2.8.1 and qt-4.5. Regards, John On Apr 7, 2009, at 11:29 PM, Paolo Cavallini wrote: Hi all. Thanks to Anne, the HomeRange plugin is now updated. It should show off automagically the next time you open QGIS. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
John C. Tull ha scritto: > The plugin fails to recognize loaded point layers on OS X with rpy2, R > 2.8.1 and qt-4.5. Anne: should I revert to previous version, or cau you check this? All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
This might be related to OS X weirdness with library linking. I can reproduce this problem in ftools also. I'll report back if I it working. John On Apr 8, 2009, at 9:10 AM, Paolo Cavallini wrote: John C. Tull ha scritto: The plugin fails to recognize loaded point layers on OS X with rpy2, R 2.8.1 and qt-4.5. Anne: should I revert to previous version, or cau you check this? All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
I've worked out the OS X linking issues. When I run on a modest dataset, I now receive the following error. I'd be happy to test with another shapefile of points if it will help. An error has occured while executing Python code: Traceback (most recent call last): File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_dialog.py", line 75, in QObject.connect(self.buttonBox, SIGNAL("accepted()"), lambda mth=mth: self.run(mth)) File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_dialog.py", line 170, in run output = Rcall(geomData, opt) File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_algorithm.py", line 96, in Rcall homeranges = rpy.r['HR_cruncher'](data, method=i, prc = opt["methods"][i]["percent"]) File "/Library/Python/2.5/site-packages/rpy2/rpy_classic.py", line 214, in __call__ res = self.__sexp(*args_r, **kwargs_r) RRuntimeError: Error in kernelUD(dd[, c("X", "Y")], dd[, "ID"], h = "LSCV", grid = grid) : At least 5 relocations are required to fit an home range Python version: 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] Python path:['/Applications/qgis1.1.0.app/Contents/MacOS/share/qgis/ python', '/Users/jctull/.qgis//python/plugins', '/Applications/ qgis1.1.0.app/Contents/MacOS/share/qgis/python/plugins', '/Library/ Frameworks/GDAL.framework/Versions/1.6/Python/site-packages', '/ Library/Python/2.5/site-packages/Shapely-1.0.4-py2.5.egg', '/Library/ Python/2.5/site-packages/simplejson-1.9.2-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/nose-0.11.0.dev_r560-py2.5.egg', '/ Library/Python/2.5/site-packages/setuptools-0.6c9-py2.5.egg', '/ Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5- macosx-10.3-i386.egg', '/Library/Python/2.5/site-packages/pymc-2.0rc2- py2.5-macosx-10.3-i386.egg', '/Library/Python/2.5/site-packages/ pytz-2008i-py2.5.egg', '/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg', '/Library/Python/2.5/site-packages/pyparsing-1.5.1- py2.5.egg', '/Library/Python/2.5/site-packages/psycopg2-2.0.8-py2.5- macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/ PyOpenGL-3.0.0b8-py2.5.egg', '/Library/Python/2.5/site-packages/ scipy-0.7.0-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site- packages/pyamg-1.0.0-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/ site-packages/numpy-1.2.1-py2.5-macosx-10.5-i386.egg', '/usr/local/lib/ wxPython-unicode-2.8.9.1/lib/python2.5/site-packages', '/usr/local/lib/ wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wx-2.8-mac- unicode', '/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/python25.zip', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/System/ Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat- mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/ Python.framework/Versions/2.5/Extras/lib/python', '/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/ System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ lib-dynload', '/Library/Python/2.5/site-packages', '/usr/local/lib/ wxPython-unicode-2.8.9.1/lib/python2.5', '/System/Library/Frameworks/ Python.framework/Versions/2.5/Extras/lib/python/PyObjC', '/Users/ jctull/.qgis/python/plugins/fTools/tools']\ Regards, John On Apr 7, 2009, at 11:29 PM, Paolo Cavallini wrote: Hi all. Thanks to Anne, the HomeRange plugin is now updated. It should show off automagically the next time you open QGIS. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
John C. Tull ha scritto: This might be related to OS X weirdness with library linking. I can reproduce this problem in ftools also. I'll report back if I it working. thanks for testing. I can send you previous vesion of the plugin to check if it works - but I haven't changed a line of the code that raises the error. let us know further details of this issue. best regards, Anne On Apr 8, 2009, at 9:10 AM, Paolo Cavallini wrote: John C. Tull ha scritto: The plugin fails to recognize loaded point layers on OS X with rpy2, R 2.8.1 and qt-4.5. Anne: should I revert to previous version, or can you check this? All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
John C. Tull ha scritto: I've worked out the OS X linking issues. When I run on a modest dataset, I now receive the following error. I'd be happy to test with another shapefile of points if it will help. An error has occured while executing Python code: Traceback (most recent call last): [cut] RRuntimeError: Error in kernelUD(dd[, c("X", "Y")], dd[, "ID"], h = "LSCV", grid = grid) : At least 5 relocations are required to fit an home range this is a normal R error - to compute homeranges, subsets of points determined by the attribute in the colum you chose (for esample animal ID, month, year...) must contain at least 5 points. Even one subset with <5 points raises this error. I suggest to group points by another column. On my side, I will change the code to avoid Python error, and raise a info window instead. many thanks and best regards, Anne ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
Here is an error I get now using a shapefile with a set of points creating home ranges on field 'ID'. There is only one ID for all the points, so it should create a single home range estimate for each method. An error has occured while executing Python code: Traceback (most recent call last): File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_dialog.py", line 75, in QObject.connect(self.buttonBox, SIGNAL("accepted()"), lambda mth=mth: self.run(mth)) File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_dialog.py", line 170, in run output = Rcall(geomData, opt) File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_algorithm.py", line 102, in Rcall singleshp = robjects.r['exporter'](homeranges, attributes, level = "%d" % opt["methods"][i]["percent"], export = robjects.r.c(opt["io"] ["mode"]), shapename= opt["io"]["layername"], dir="%s" % opt["io"] ["outputfolder"], owr= opt["io"]["overwrite"]) File "/Library/Python/2.5/site-packages/rpy2/robjects/__init__.py", line 422, in __call__ res = super(RFunction, self).__call__(*new_args, **new_kwargs) RRuntimeError: Error in writeOGR(khr.polygons, dir, name, "ESRI Shapefile") : GDAL Error 1: Failed to create file .shp file. Python version: 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] Python path:['/Applications/qgis1.1.0.app/Contents/MacOS/share/qgis/ python', '/Users/jctull/.qgis//python/plugins', '/Applications/ qgis1.1.0.app/Contents/MacOS/share/qgis/python/plugins', '/Library/ Frameworks/GDAL.framework/Versions/1.6/Python/site-packages', '/ Library/Python/2.5/site-packages/nose-0.11.0.dev_r560-py2.5.egg', '/ Library/Python/2.5/site-packages/setuptools-0.6c9-py2.5.egg', '/ Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5- macosx-10.3-i386.egg', '/Library/Python/2.5/site-packages/pytz-2008i- py2.5.egg', '/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg', '/Library/Python/2.5/site-packages/pyparsing-1.5.1- py2.5.egg', '/Library/Python/2.5/site-packages/PyOpenGL-3.0.0b8- py2.5.egg', '/Library/Python/2.5/site-packages/scipy-0.7.0-py2.5- macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/pyamg-1.0.0- py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/ numpy-1.2.1-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site- packages/simplejson-2.0.9-py2.5-macosx-10.5-i386.egg', '/Library/ Python/2.5/site-packages/Shapely-1.0.11-py2.5.egg', '/Library/Python/ 2.5/site-packages/psycopg2-2.0.9-py2.5-macosx-10.5-i386.egg', '/ Library/Python/2.5/site-packages/pymc-2.0-py2.5-macosx-10.3-i386.egg', '/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages', '/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/ wx-2.8-mac-unicode', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5', '/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/ System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/ Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib- tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/usr/ local/lib/wxPython-unicode-2.8.9.1/lib/python2.5', '/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC', '/ Applications/qgis1.1.0.app/Contents/MacOS/share/qgis/python/plugins/ fTools/tools'] On Apr 9, 2009, at 1:31 AM, Anne Ghisla wrote: John C. Tull ha scritto: I've worked out the OS X linking issues. When I run on a modest dataset, I now receive the following error. I'd be happy to test with another shapefile of points if it will help. An error has occured while executing Python code: Traceback (most recent call last): [cut] RRuntimeError: Error in kernelUD(dd[, c("X", "Y")], dd[, "ID"], h = "LSCV", grid = grid) : At least 5 relocations are required to fit an home range this is a normal R error - to compute homeranges, subsets of points determined by the attribute in the colum you chose (for esample animal ID, month, year...) must contain at least 5 points. Even one subset with <5 points raises this error. I suggest to group points by another column. On my side, I will change the code to avoid Python error, and raise a info window instead. many thanks and best regards, Anne ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/li
Re: [Qgis-user] HomeRange plugin updated
In addition to the last error, when I quit and restart qgis after loading and installing the HomeRange plugin, I get this error during startup. Afterwards, the HomeRange plugin cannot be loaded: Couldn't load plugin "HomeRange_plugin" from ['/Applications/ qgis1.1.0.app/Contents/MacOS/share/qgis/python', '/Users/jctull/.qgis// python/plugins', '/Applications/qgis1.1.0.app/Contents/MacOS/share/ qgis/python/plugins', '/Library/Frameworks/GDAL.framework/Versions/1.6/ Python/site-packages', '/Library/Python/2.5/site-packages/ nose-0.11.0.dev_r560-py2.5.egg', '/Library/Python/2.5/site-packages/ setuptools-0.6c9-py2.5.egg', '/Library/Python/2.5/site-packages/ matplotlib-0.98.6svn-py2.5-macosx-10.3-i386.egg', '/Library/Python/2.5/ site-packages/pytz-2008i-py2.5.egg', '/Library/Python/2.5/site- packages/py2app-0.3.6-py2.5.egg', '/Library/Python/2.5/site-packages/ pyparsing-1.5.1-py2.5.egg', '/Library/Python/2.5/site-packages/ PyOpenGL-3.0.0b8-py2.5.egg', '/Library/Python/2.5/site-packages/ scipy-0.7.0-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site- packages/pyamg-1.0.0-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/ site-packages/numpy-1.2.1-py2.5-macosx-10.5-i386.egg', '/Library/ Python/2.5/site-packages/simplejson-2.0.9-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/Shapely-1.0.11-py2.5.egg', '/ Library/Python/2.5/site-packages/psycopg2-2.0.9-py2.5-macosx-10.5- i386.egg', '/Library/Python/2.5/site-packages/pymc-2.0-py2.5- macosx-10.3-i386.egg', '/usr/local/lib/wxPython-unicode-2.8.9.1/lib/ python2.5/site-packages', '/usr/local/lib/wxPython-unicode-2.8.9.1/lib/ python2.5/site-packages/wx-2.8-mac-unicode', '/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/System/ Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/ System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/ 2.5/lib/python2.5/plat-mac', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib- scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/ 2.5/Extras/lib/python', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/lib-tk', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/ Python/2.5/site-packages', '/usr/local/lib/wxPython-unicode-2.8.9.1/ lib/python2.5', '/System/Library/Frameworks/Python.framework/Versions/ 2.5/Extras/lib/python/PyObjC', '/Applications/qgis1.1.0.app/Contents/ MacOS/share/qgis/python/plugins/fTools/tools'] Traceback (most recent call last): File "", line 2, in File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ __init__.py", line 32, in from HRplugin_main import HRPlugin File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_main.py", line 40, in from HRplugin_dialog import Dialog File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_dialog.py", line 44, in from HRplugin_algorithm import * File "/Users/jctull/.qgis//python/plugins/HomeRange_plugin/ HRplugin_algorithm.py", line 46, in import rpy2.robjects as robjects File "/Library/Python/2.5/site-packages/rpy2/robjects/__init__.py", line 12, in import rpy2.rinterface as rinterface File "/Library/Python/2.5/site-packages/rpy2/rinterface/ __init__.py", line 6, in R_HOME = os.popen("R RHOME").readlines() IOError: [Errno 4] Interrupted system call Python version: 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] Python path:['/Applications/qgis1.1.0.app/Contents/MacOS/share/qgis/ python', '/Users/jctull/.qgis//python/plugins', '/Applications/ qgis1.1.0.app/Contents/MacOS/share/qgis/python/plugins', '/Library/ Frameworks/GDAL.framework/Versions/1.6/Python/site-packages', '/ Library/Python/2.5/site-packages/nose-0.11.0.dev_r560-py2.5.egg', '/ Library/Python/2.5/site-packages/setuptools-0.6c9-py2.5.egg', '/ Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5- macosx-10.3-i386.egg', '/Library/Python/2.5/site-packages/pytz-2008i- py2.5.egg', '/Library/Python/2.5/site-packages/py2app-0.3.6- py2.5.egg', '/Library/Python/2.5/site-packages/pyparsing-1.5.1- py2.5.egg', '/Library/Python/2.5/site-packages/PyOpenGL-3.0.0b8- py2.5.egg', '/Library/Python/2.5/site-packages/scipy-0.7.0-py2.5- macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/pyamg-1.0.0- py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/ numpy-1.2.1-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site- packages/simplejson-2.0.9-py2.5-macosx-10.5-i386.egg', '/Library/ Python/2.5/site-packages/Shapely-1.0.11-py2.5.egg', '/Library/Python/ 2.5/site-packages/psycopg2-2.0.9-py2.5-macosx-10.5-i386.egg', '/ Library/Python/2.5/site-packages/pymc-2.0-py2.5-macosx-10.3-i386.egg', '/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages', '/usr/local/l
Re: [Qgis-user] HomeRange plugin updated
John C. Tull ha scritto: Here is an error I get now using a shapefile with a set of points creating home ranges on field 'ID'. There is only one ID for all the points, so it should create a single home range estimate for each method. An error has occured while executing Python code: Traceback (most recent call last): [cut] RRuntimeError: Error in writeOGR(khr.polygons, dir, name, "ESRI Shapefile") : GDAL Error 1: Failed to create file .shp file. Bad thing. GDAL is the dependency I know (and care) less, assuming it works independently of HR_plugin installation. I would ask if you can run a pure R test, to check if the error comes out from rgdal package or GDAL itself, like this one: cities <- readOGR(system.file("vectors",package="rgdal")[1],"cities") writeOGR(cities,tempdir(),"cities",driver="ESRIShapefile") and see if it raises a similar error. If the test above succeeds, you can comment line 102 of HRplugin_algorithm.py and uncomment line 101, choosing suitable dir parameter. I'll look for more details about this issue - moreover, please fill a ticket on AniMove Trac [0] if the problem persists. thanks for testing, Anne ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] HomeRange plugin updated
John C. Tull ha scritto: In addition to the last error, when I quit and restart qgis after loading and installing the HomeRange plugin, I get this error during startup. Afterwards, the HomeRange plugin cannot be loaded: Couldn't load plugin "HomeRange_plugin" from [snip] Traceback (most recent call last): [snip] File "/Library/Python/2.5/site-packages/rpy2/rinterface/__init__.py", line 6, in R_HOME = os.popen("R RHOME").readlines() IOError: [Errno 4] Interrupted system call The same error is given by manageR [0], therefore I guess it is a rpy2 issue. You can try the function that returns this error alone in a Python shell. On my WinXp machine it returns the correct path to R installation. If it succeeds, try in the Python shell each function of the traceback stepping backwards. Consider also filling a ticket on RPy2 bugtracker on SourceForge [1]. thank you for testing and best regards, Anne [0] http://www.mail-archive.com/qgis-user@lists.osgeo.org/msg02601.html [1] http://sourceforge.net/tracker/?atid=453021&group_id=48422&func=browse ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user