Error when running Linkage Priority - No statistics available

125 views
Skip to first unread message

Carina Firkowski

unread,
Jun 22, 2023, 9:37:52 AM6/22/23
to Linkage Mapper
Hi,

I'm working with ArcGIS Pro and Linkage Mapper version 3.1.0.

I'm running Linkage Priority (after running Linkage Pathways successfully) and I'm getting the following error log.

Linkage Priority Version 3.1-Beta
A record of run settings and messages can be found in your log directory: D:\BLBRoutputs\run_history\log
Retreiving outputs from Linkage Pathways model run
Calculating permeability for each LCP line
Calculating relative closeness for each LCP line
Calculating Core Area Value (CAV) and its components for each core
Calculating Corridor Specific Priority (CSP) for each linkage:
-Calculating CSP
Calculating Blended Priority (BP):
-Clipping NLCC rasters to CWD threshold
-Inverting and normalizing each corridor
ERROR 001100: Failed because no statistics are available. Failed to execute (GetRasterProperties). Traceback (most recent call last): File "D:\LinkageMapper\toolbox\scripts\lp_main.py", line 631, in main True) File "D:\LinkageMapper\toolbox\scripts\lp_main.py", line 604, in run_analysis "!" + lm_env.PREFIX + "_Cores.CF_Central!", "PYTHON_9.3") File "D:\LinkageMapper\toolbox\scripts\lp_main.py", line 119, in calc_blended_priority if not nlcc_top_list: File "D:\LinkageMapper\toolbox\scripts\lp_main.py", line 63, in inv_norm File "D:\LinkageMapper\toolbox\scripts\lp_main.py", line 24, in normalize_raster File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 22479, in GetRasterProperties raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 22476, in GetRasterProperties retval = convertArcObjectToPythonObject(gp.GetRasterProperties_management(*gp_fixargs((in_raster, property_type, band_index), True))) Failed script Linkage Priority...
Failed to execute (LinkagePriority).
Failed at Thursday, June 22, 2023 9:31:09 AM (Elapsed Time: 39.54 seconds)

Any support would be greatly appreciated. Thanks.

John Gallo

unread,
Jun 22, 2023, 6:10:29 PM6/22/23
to linkage...@googlegroups.com
Hello Carina,

Can you please provide the full log file that was generated at the same time along with the error?  Ideally also the Log file with the associated ru with Linkage Pathways Tool.

Thanks,

John

--
You received this message because you are subscribed to the Google Groups "Linkage Mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linkage-mappe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linkage-mapper/1839ce87-9077-4f9f-8ac8-3cdd9bc834b6n%40googlegroups.com.


--
John A. Gallo, Ph.D.
Project Director
LinkageMapper.org

and

Senior Conservation Scientist
Conservation Biology Institute

Carina Firkowski

unread,
Jun 22, 2023, 8:03:28 PM6/22/23
to Linkage Mapper
Hi John,
Here are the log files from the Linkage Pathways and Linkage Priority runs.
Thanks for looking into it.
2023_06_22_1036_Linkage Mapper.txt
2023_06_22_1110_Linkage Priority.txt

John Gallo

unread,
Jun 22, 2023, 8:38:45 PM6/22/23
to linkage...@googlegroups.com
Hi Carina,

Thanks. I would make sure that the core and resistance files are in the exact same projection and try again.  If that does not work, try a shorter name for the field of the cores. Please let us know if neither of those solves the issue. 

Thanks,

John

Carina Firkowski

unread,
Jun 23, 2023, 9:25:41 AM6/23/23
to Linkage Mapper
Hi John,

The spatial layers were in complementary projections. I corrected that and also shortened the name for the field of cores.
However, these changes did not resolve the issue.
Attached are the new log files, which are essentially the same thing as the previous ones.

2023_06_23_0909_Linkage Mapper.txt
2023_06_23_0916_Linkage Priority.txt

John Gallo

unread,
Jun 23, 2023, 8:06:54 PM6/23/23
to linkage...@googlegroups.com
Hi Carina,

This is odd.  Fortunately it is just taking about 5-10 minutes to do each run.

One way to address this is for you to share the two input files and see if someone can reproduce the error on their machine.  If me, I won't be able to do it until mid/late next week.  If you share them now though, someone else in the community may take a stab.

Another way is via trial and error for any idea.  One idea is to make sure that each core area completely contains at least one resistance cell.  And to make sure there are no null values in the resistance layer.

Thanks,

JOhn

Carina Firkowski

unread,
Jun 24, 2023, 10:22:23 AM6/24/23
to Linkage Mapper
Hi John & community,

I tried adding very high resistance values (10,000) to the pixels outside my study area (oval shape) as to avoid the presence of NA values (tagged as 9,999) and complete the raster extent. However, that too did not resolve the issue.

If a kind soul could please try to reproduce this error, I would greatly appreciate it. Attached are the two input files required to run Linkage Mapper and Linkage Priority. As noted above, Linkage Mapper should run with no issues using default values and a threshold of 2,000. Please select "Name" as the core field ID. It's Linkage Priority that is returning the error.

Thanks much,
Carina
OECMsSources.zip
ODVI_Resistance_AnalysisArea.tif

Indranil Mondal

unread,
Jun 25, 2023, 1:44:09 PM6/25/23
to linkage...@googlegroups.com
Hello Carina,

I ran your linkage pathways and linkage priority tools with default settings on your data and it ran just fine. I am attaching the log file for you to see. However, considering the error that you got:
ERROR 001100: Failed because no statistics are available. Failed to execute (GetRasterProperties)
I would suggest you to kindly run the "Calculate Statistics" tool in ArcGIS Pro on your raster resistance layer and then try running the tools.
When I tried adding the resistance raster to my ArcGIS Pro, it automatically asked me if I wanted to calculate the statistics and I said yes. I believe that's why I didn't get the error.

Regards,
Indranil Mondal.
- - - - - - - - - - -
Project Scientist II
Wildlife Institute of India
Dehradun, India.
Skype: i_mondal, Twitter: @IndranilMondal5


2023_06_25_2247_Linkage Mapper.txt
2023_06_25_2258_Linkage Priority.txt

Carina Firkowski

unread,
Jun 26, 2023, 9:17:40 AM6/26/23
to Linkage Mapper
Hi Indranil,

Thanks for running. I had tried calculating statistics before and continued to have the same error.
Like you did, I loaded the layers, ArcGIS Pro also asked if I wanted to calculate statistics, and I said yes. I tried it again this morning and still the same error.

What versions of ArcGIS Pro and LinkageMapper are you using?
I'm using ArcGIS Pro and LinkageMapper 3.1.0.

Thanks,
Carina

John Gallo

unread,
Jun 26, 2023, 12:05:56 PM6/26/23
to linkage...@googlegroups.com
Thank you Indranil!

Thanks for taking time from your busy schedule to volunteer on this task.

Hi Carina, 

You can see by his run_log that he is running Arc Pro 3.1 and Windows 10.

I also note that he used the COREFIELD = SOURCENAME  rather than = NAME

Possibly that is the fix? Or maybe he changed the field name before running.

Thanks,

John

Carina Firkowski

unread,
Jul 17, 2023, 4:13:26 PM7/17/23
to Linkage Mapper
After a couple of weeks, I'm back trying to address this issue. 

I tried implementing the solutions proposed above, but nothing worked. Eventually, I made a mistake and ran Linkage Pathways using the default cost-distance threshold (200,000 = 200 km, instead of 2,000 = 2 km). Following this, Linkage Priority ran. I proceeded to test smaller values for the cost-distance threshold, and the lowest I was able to go was 10,000 = 10 km. Why is that? I can't find any information in the documentation and the error Linkage Mapper returns when using smaller values (such as my target value of 2 km) is not informative:
ERROR 001100: Failed because no statistics are available. Failed to execute (GetRasterProperties).

This makes me wonder, was Indranil able to run LP with a cost-distance threshold of 2,000 = 2 km or is there a change they forgot to change this parameter from the default of 200,000 = 200 km? If the former, why is it not running for me?

Now, with LP running based on the 10 km cost-distance threshold, the results seem off. Please see below the screenshots of the outputs from both Linkage Pathways and Linkage Priority. The first thing to notice is that not all corridors receive a priority value. Why is that? Also, the corridors in blended_priority are composed of multiple unique values that are arranged in non-continuous ways. What is happening here? Yet, when I change the symbology, all corridors look the same.

LM.PNGLP.PNG
 
I'd really appreciate if someone could help me here. 
Thanks,
Carina

Carina Firkowski

unread,
Jul 17, 2023, 4:16:56 PM7/17/23
to Linkage Mapper
Reposting the second image because it was hard to see the pattern I'm refering to:
LP.PNG

John Gallo

unread,
Jul 17, 2023, 5:15:41 PM7/17/23
to linkage...@googlegroups.com
Hi Carina,

1) Cost weighted distance is the distance of a cell, usually in meters, times the cost of moving through that cell.  So, if the cost weight is 100, and the cell is 30 m, then I'm pretty sure the cost weighted distance of that cell is 3000.

2) The CWD threshold is about the width of the linkages, not the length.  It is the max CWD perpendicular from the least cost path I'm pretty sure.

3) Hence, your CWD threshold of 200,000 is probably pretty reasonable. 

4) If you limit the number of linkages allowed from any given core (one of the parameters), then not all linkages will be mapped.  Probably the same if your CWD threshold is very small, like 10,000, since it may be clipping some linages that do not meet this threshold.

I hope that helps.

John


Carina Firkowski

unread,
Jul 18, 2023, 10:47:52 AM7/18/23
to linkage...@googlegroups.com
Hi John,

Thanks for your quick response. The confirmation about how the CWD threshold works was helpful.

But I’m still unclear about a few things:

(1) The entire study area is 20 km wide, the spatial resolution is 15 m, and the resistance values range from 1 to 32 (with some linear features such as highways having a resistance of 100). Hence, it seems a bit liberal setting the CWD to 20,000 or even 10,000 because this would mean that: (a) species could cross the highest resistance cells for 6-12 cells (or 90-180 m), and (b) if resistance was 1 across the entire landscape, the corridor could have the width of the entire or half of the study area. Neither make a lot of sense.

(2) I was initially pruning the network so it would only calculate corridors between the nearest neighbour. However, I also tried running without that option and still a smaller number of corridors are displayed in the linkage priority output compared to the truncated corridors output from linkage pathways. Additionally, the screenshots I shared before were from the same run: the truncated corridors at a 10 km CWD threshold, and its blended_priority based. So I still don’t understand why the blended_priority would display a smaller number of corridors than the truncated corridors raster. Shouldn’t it rank all corridors identified in the previous step?

(3) Were you able to notice the stripped pattern in the blended_priority output? Within each corridor, there are stripes of intercalated low and high values. What is happening there?

Thanks for your help!

Carina



On Jul 17, 2023, at 5:15 PM, John Gallo <john....@linkagemapper.org> wrote:


You received this message because you are subscribed to a topic in the Google Groups "Linkage Mapper" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linkage-mapper/GY5bhv9Cd08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linkage-mappe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linkage-mapper/CAEUWjEtAbhgUYhR1EKC7Tt9djgsLOnbJT3HTRah-T%2BXOy1GDRw%40mail.gmail.com.

John Gallo

unread,
Jul 18, 2023, 1:46:41 PM7/18/23
to linkage...@googlegroups.com, carina.f...@gmail.com, John Gallo
Hi Carina,

re: 1) I suggest that you run the demo data and tutorial, and take a close look at the least cost path output.  It sounds like that is what you are after most especially.  Notice also how the outputs are styled in the .mxd that has the stylings preloaded.  See especially the one that uses the CWD threshold.  You can think of the resulting width as a margin of error. Not that it is saying your species will suddenly veer right across 90 m of highway.

Then, I suggest that as a bare minimum, setting a CWD threshold that results in a minimum linkage width (anywhere on the region) of at least 3 cells to avoid strange behaviors.  If you have a place that is narrowed to one cell then you have gone too far in this threshold. This is not ecologically sound, and also may introduce calculation anomalies with Linkage Priority Tool. Know also that 3 cells is unusually strict. 

I recommend instead that you consider what species or group of species you are trying to conserve, and looking in the literature or talking with experts to get an estimate on how narrow their linkage should get at its pinchpoints, at a minimum.  Then through trial and error or by careful examination of the full output (not trimmed by the CWD threshold) you can set the CWD threshold accordingly.

If you like, you can set your color ramp so that most of the width of the linkage is grey, or something like that, indicating that you think it is low likelihood.

re: 2) Make sure that you are not using the option in linkage priority tool to remove linkages that are below a certain priority threshold.

re: 3) Doing the above should fix this.  

If this does not solve your problems please contact me directly. Please keep in mind that I am currently providing linkage mapper support on volunteer time.

Thank you,

John


Carina Firkowski

unread,
Jul 18, 2023, 6:09:39 PM7/18/23
to Linkage Mapper
Hi John, thanks again for the feedback.

The corridor width of 2 km that I intended to use is based the requirements of the species I'm concerned with.

I double-checked and I am running Linkage Priority without the option to remove linkages that are below a certain priority threshold:
LP-1.PNG

Here is one more look at my workflow and the results I'm getting.
1. I run Linkage Pathways with default settings and a CWD threshold of 10,000.
2. Here are the resulting LCPs and truncated corridors, along with the sources:
LM-1.PNG
3. I then run Linkage Priority with default settings, except for:
LP-2.PNG
4. Here's the resulting blended_priority:
LP-3.PNG
You can see that not all LCPs are ranked, and the width of the paths gets really small compared to the truncated corridors output displayed above.

I guess the key question is, is this the output you would expect? 

I tried running the same analyses using a CWD threshold of 20,000, and this is the result from linkage priority:
LP-4.PNG

I guess I need to try a value in between, right?

John Gallo

unread,
Jul 18, 2023, 6:19:11 PM7/18/23
to linkage...@googlegroups.com
Thank you for the clarification.  Your Linkage Pathways result looks good at CWD threshold of 10,000. No, that is not the result I expect from Linkage Priority tool. Please be sure you are using the latest version (3.1) and if so, please send me the log files of both runs.

Carina Firkowski

unread,
Jul 18, 2023, 6:29:04 PM7/18/23
to Linkage Mapper
Yes, I'm using the latest version.
Here are the run logs for both runs:
- 1702 is based on a 10,000 CWD threshold
- 1756 is based on a 20,000 CWD threshold

2023_07_18_1756_Linkage Priority.txt
2023_07_18_1702_Linkage Priority.txt
Reply all
Reply to author
Forward
0 new messages