Design error

Skip to first unread message

Stuart Cairns

Jul 19, 2021, 2:51:09 AMJul 19
to distance-sampling
Dear Distance Users:
I'm developing a design for a helicopter survey.  I've done this before.  The basis of the approach I take is to compare systematic segmented sampling designs (segmented trackline and a segmented grid) using samplers of different lengths to work out which design gives me a realistic optimal coverage.  I have no trouble fitting my segmented trackline designs, but when I try the segment grid designs, I get the following error message:

** Error: Unexpected error in Design Engine.
Error number: -2147211505
Error source: D7DesEng.CoverageProbabilityGrid.CalculateProbabilities
Error description: Unexpected error in Distance Design Engine.
Source: D7DesEng.CoverageProbabilityGrid.CalculateProbabilities
Internal Error number: 9.
Internal Error description: "Subscript out of range".
About to read design definition. 

About to read design definition. 
Initializing general design properties. 
Selecting the design class. 
Selecting the design sampler. 
Initializing the line sampler properties. 
Initializing the coverage probability grid properties. 
Calculating the overall coverage probabilities. 
Starting simulations for stratum number 1. 
I notice that this problem has cropped up before, but I have not seen a published solution to it.  I could be looking in the wrong place.  However, any suggestions as to what might be creating this problem or, better still, any offer of a  solution would be greatly appreciated.


Eric Rexstad

Jul 19, 2021, 3:06:05 AMJul 19
to Stuart Cairns, distance-sampling

Good morning Stuart

You are correct this error has popped up before on the Distance list, without obvious resolution.  I understand what you are trying to do; iterating through different segment lengths in the two segmented transect designs.  Can you tell me a bit more?

Does the engine succeed for all your segmented trackline investigations, or does it fail at some segment length?

Conversely, does the design engine fail for all segmented grid designs you try, or does it succeed sometimes and fail when segment length reaches some critical length (too short or too long)?

Given you can get some designs to work, it doesn't seem there are problems with the shape file you are using, so challenges are internal to the engine.  If you want to move the conversation off-list, we can come back to the list with a solution (if we find one).

You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Eric Rexstad
Centre for Ecological and Environmental Modelling
University of St Andrews
St Andrews is a charity registered in Scotland SC013532
Reply all
Reply to author
0 new messages