Linkage mapper fails at step 5

297 views
Skip to first unread message

Alex Lechner

unread,
Jun 13, 2017, 6:34:53 PM6/13/17
to Linkage Mapper
Hi,

I having been trying to get linkage mapper working with ArcGIS 10.5. For some reason it doesn't work at step 5.

I tried with my own data and then I tried it with the demo data and it always seems to stop at step 5 with similar error messages.

I ran Linkage Mapper using Arc Catalog and ArcMap and both times it failed.

See below for the output from the text box.

Thanks in advance.

Alex



Executing: MapLinkages C:\Aus\a Cores core_ID resistances true true "Cost-Weighted & Euclidean" # true true false 4 Cost-Weighted true true # # #
Start Time: Tue Jun 13 21:34:48 2017
Running script MapLinkages...
---------------------------------
A record of run settings and messages can be found in your log directory:
C:\Aus\a\run_history\log
---------------------------------


********************************************************
NOTE: Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap.


Linkage Mapper Version 1.1.0
on ArcGIS Desktop 10.5 Service Pack N/A
Setting data frame spatial reference to that of core area feature class.

---------------------------------
Starting at step 1.

Making temporary copy of resistance raster for this run.

Making temporary raster of core file for this run.

---------------------------------
Running script s1_getAdjacencies.py
Adjacency files will be written to C:\Aus\a\datapass\adj

Calculating cost-weighted distance adjacency
Starting cost-weighted distance allocation...
Processing cell size: 399.887656228056

Building output statistics and pyramids for CWD raster.
Cost-weighted distance allocation done.
That took 3 seconds.

Calculating adjacencies crossing allocation boundaries...
That took 4 seconds.

---------------------------------
Calculating Euclidean adjacency
Starting Euclidean adjacency processing...

Euclidean distance allocation done.
That took 0 seconds.

Calculating adjacencies crossing allocation boundaries...
That took 4 seconds.


---------------------------------
Running script s2_buildNetwork.py
Simplifying polygons for core pair distance calculations

Finding distances between cores using Generate Near Table.
There are 10 adjacent core pairs to process.
10 percent done
20 percent done
30 percent done
40 percent done
50 percent done
60 percent done
70 percent done
80 percent done
90 percent done
That took 1 seconds.

Distance file C:\Aus\a\Cores_dists.txt generated.

Core area distance list loaded.
number of pairwise distances = 10

---------------------------------
Removed 0 duplicate core pairs in Euclidean distance table.

After removing duplicates and distances that exceed maximum,
there are 10 pairwise distances. Max core ID number is 13.
Cost-weighted adjacency file loaded.
Creating link table

Keeping all adjacent links


Checking for corridors that are too long to map.
Writing C:\Aus\a\datapass\linkTable_s2.csv
There are 10 links in the table.
This includes 10 potential corridor links.
Creating shapefiles with linework for links.

Linework shapefiles written.

---------------------------------
Running script s3_calcCwds.py
---------------------------------
NOT using bounding circles in cost distance calculations.

Looking for C:\Aus\a\datapass\linkTable_s2.csv
There are 10 links in the table.
This includes 10 potential corridor links.

Number of core areas to connect: 6

Creating cost-weighted distance output folders
...cw

Checking for corridors that are too long to map.
Creating core area raster.

Starting cost distance calculations.

---------------------------------
Target core areas for core area #1 = [ 9 11 13]
Found an intermediate core in the least-cost path between cores 1 and 9. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 1 and 11. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 1 and 13. The corridor will be removed.
Done with all calculations for core ID #1. 1 of 6 cores have been processed.
That took 16 seconds.

---------------------------------
Target core areas for core area #7 = [ 8 9 13]
Found an intermediate core in the least-cost path between cores 7 and 8. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 7 and 9. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 7 and 13. The corridor will be removed.
Done with all calculations for core ID #7. 2 of 6 cores have been processed.
That took 16 seconds.

---------------------------------
Target core areas for core area #8 = [ 9 11]
Found an intermediate core in the least-cost path between cores 8 and 9. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 8 and 11. The corridor will be removed.
Done with all calculations for core ID #8. 3 of 6 cores have been processed.
That took 13 seconds.

---------------------------------
Target core areas for core area #9 = [11 13]
Found an intermediate core in the least-cost path between cores 9 and 11. The corridor will be removed.
Found an intermediate core in the least-cost path between cores 9 and 13. The corridor will be removed.
Done with all calculations for core ID #9. 4 of 6 cores have been processed.
That took 12 seconds.

Done with all calculations for core ID #11. 5 of 6 cores have been processed.
That took 0 seconds.

Done with all calculations for core ID #13. 6 of 6 cores have been processed.
That took 0 seconds.

Updating C:\Aus\a\datapass\linkTable_s3.csv
Creating shapefiles with linework for links...
That took 0 seconds.


Individual cost-weighted distance layers written to "cwd" directory.

C:\Aus\a\datapass\linkTable_s3.csv
updated with cost-weighted distances between core areas.

---------------------------------
Running script s5_calcLccs.py

Looking for C:\Aus\a\datapass\linkTable_s4.csv

Looking for C:\Aus\a\datapass\linkTable_s3.csv
There are 10 links in the table.

***NOTE: There are NO corridors to map!
---------------------------------


---------------------------------

There are no corridors to map. Bailing.

---------------------------------
****Failed in step 5. Details follow.****
---------------------------------
Python error on **line 130** of s5_calcLccs.py in Linkage Mapper Version 1.1.0:
SystemExit: 1

---------------------------------
****Failed in step 5. Details follow.****
---------------------------------
Python error on **line 55** of s5_calcLccs.py in Linkage Mapper Version 1.1.0:
SystemExit: 1
---------------------------------
Python error on **line 182** of lm_master.py in Linkage Mapper Version 1.1.0:
SystemExit: 1
---------------------------------
A record of run settings and messages can be found in your log directory:
C:\Aus\a\run_history\log
---------------------------------

Completed script MapLinkages...
Failed to execute (MapLinkages).
Failed at Tue Jun 13 21:36:06 2017 (Elapsed Time: 1 minutes 17 seconds)

John Gallo

unread,
Jun 14, 2017, 4:27:25 PM6/14/17
to Linkage Mapper
Hi Alex and All,

Alex,

Did you get the below when using the Sample Data, or your Data?

All,

Do I remember correctly that someone ran this sucessfully with 10.5 recently?  If so, did you get the below and work through it?

Thanks,

John

Alex Lechner

unread,
Jun 16, 2017, 5:01:32 PM6/16/17
to Linkage Mapper
Hi John,

Thanks for your reply.

The error message I received was from the sample data. However, I received similar error messages with my own data. That data worked previously with ArcGIS 10.2.

Cheers,

Alex

John Gallo

unread,
Jun 16, 2017, 5:21:12 PM6/16/17
to Linkage Mapper
hmmm.  It seems to be an error in the link table or link table generation.  Can you attach 

C:\Aus\a\datapass\linkTable_s4.csv 

and C:\Aus\a\datapass\linkTable_s3.csv ?

Ideally, (but not necessary) can you look in one of your past, successful runs from when you had 10.2, and attach the same tables?


On Tuesday, June 13, 2017 at 3:34:53 PM UTC-7, Alex Lechner wrote:

Alex Lechner

unread,
Jun 19, 2017, 6:28:14 PM6/19/17
to Linkage Mapper
Hi John,

Sorry for the slow reply; I am travelling.

I have uploaded the output that resulted from processing the tutorial data with ArcGIS 10.5 in dropbxo https://www.dropbox.com/s/xa3yvy43rcsebjd/a.zip?dl=0. I noticed that my outputs didn't include the file linkTable_s4.csv. 

Unfortunately I don't have any successful runs from 10.2 to send you at the moment (until I return from my travels). Another complication is that the successful runs on ArcGIS 10.2 were on a different PC. 

When I get back from my travels I will try to get my hands on a copy of 10.2.

Thanks,

Alex

John Gallo

unread,
Jun 21, 2017, 7:58:22 PM6/21/17
to Linkage Mapper
Hi Alex,
Error was replicated. But I have some good news for you (a likely fix), but need to run right now.  If you need the details asap, e-mail me directly at john dot gallo at consbio dot org.  otherwise, hoping to post for everyone tomorrow.
Cheers!
John

John Gallo

unread,
Jun 22, 2017, 3:17:40 PM6/22/17
to Linkage Mapper
Hi All,

In case youhave not noticed, Brad McRae has asked me to help facilitate this forum and I've accepted. More on that later.

I've sent the draft fix for Arc 10.5 to Alex for a second round of testing. More details about this fix and its release for further testing coming soon.  Please contact me directly  if you need it in the interim.

Thanks,

John

Alex Lechner

unread,
Jun 23, 2017, 9:19:36 AM6/23/17
to Linkage Mapper
Hi John,

As I said in the email. It seems to works fine with the tutorial data. I will test it with the real data overnight.

One thing I noticed (as I am sure you know) there is no "linkTable_s4.csv", but there is a "linkTable_s5.csv".

Attached is the log file if it helps.

Thanks,

Alex
2017_6_23_1549_Linkage Mapper.txt

Alex Lechner

unread,
Jun 26, 2017, 8:17:04 PM6/26/17
to Linkage Mapper
Hi John,

I just ran a test with real data and it all seems to work now. 

Would there be any problems if I start using the update? Or should I wait for the *official* release?

Thanks,

Alex

John Gallo

unread,
Jun 26, 2017, 8:35:29 PM6/26/17
to Linkage Mapper
Hi Alex,
I don't think that will be a problem. 
Thanks,
John

Alex Lechner

unread,
Jun 27, 2017, 10:24:23 AM6/27/17
to Linkage Mapper
Excellent. Thanks for all your help.

Cheers,

Alex

John Gallo

unread,
Jul 10, 2017, 1:08:53 PM7/10/17
to Linkage Mapper
Hi All,

In case you did not see the post on the new thread with a relatd subject line, we've posted the "alpha" version of the fix on our website http://www.circuitscape.org/linkagemapper

If you test it with backwards compatibility for Arc 10.4 or earlier, and/or with other tools in the toolbox, pelae let us know how it works.

Thanks!

John
Reply all
Reply to author
Forward
0 new messages