Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
From: | "Van Lier, Olivier" <> |
---|---|
To: | "" <> |
Subject: | [mget-help] Calculate Species Diversity Index for Polygons |
Date: | Mon, 29 Jul 2013 17:34:12 +0000 |
Accept-language: | en-CA, en-US |
Greetings, What a wonderful contribution! I have just recently come across your toolset and began exploring it this morning. I was hoping to quickly implement the "Calculate
Species Diversity Index for Polygons" but for some reason I get the following error when the script attempts to write the result back into the polygon shapefile: AttributeError: 'float' object has no attribute 'has_key'. The full message from ArcGIS dialogue
box is pasted below. Please find attached the sample data I was using: any insight would be gratefully appreciated. Running environment: Windows 7 Professional, ArcGIS 10.1 SP1, Python 2.7, R win-library 2.14 Kind Regards, Olivier Olivier van Lier Executing: SpeciesDiversityCalculateDiversityIndexForArcGISPolygons
P " Start Time: Mon Jul 29 14:34:14 2013 Running script SpeciesDiversityCalculateDiversityIndexForArcGISPolygons... Intersecting the points with the polygons. Summing species counts per polygon. Reading species counts into memory. Query complete: 0:00:00 elapsed, 1 rows retrieved, 0:00:00.220000 per row. Writing species diversity index values to the polygons. Update complete: 0:00:00 elapsed, 0 rows updated, 0 deleted, 1 unchanged,
0:00:00.006000 per row. AttributeError: 'float' object has no attribute 'has_key' Traceback (most recent call last): File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\SpeciesDiversityCalculateDiversityIndexForArcGISPolygons.py",
line 5, in <module> ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.SpatialAnalysis.Diversity',
'SpeciesDiversity', 'CalculateDiversityIndexForArcGISPolygons') File "C:\Python27\ArcGIS10.1\lib\site-packages\GeoEco\ArcGISScripts.py",
line 210, in ExecuteMethodFromCommandLineAsArcGISTool exec sourceCode in globals(), locals() File "<string>", line 1, in <module> File "C:\Python27\ArcGIS10.1\lib\site-packages\GeoEco\SpatialAnalysis\Diversity.py",
line 158, in CalculateDiversityIndexForArcGISPolygons if indexValues.has_key(fidStr): AttributeError: 'float' object has no attribute 'has_key' Failed to execute (SpeciesDiversityCalculateDiversityIndexForArcGISPolygons). Failed at Mon Jul 29 14:34:22 2013 (Elapsed Time: 8.00 seconds) |
Attachment:
TestPSP.rar
Description: TestPSP.rar