Work-Around for REGION_GROW Error
QUESTION: In the IDL routine REGION_GROW, the function LABEL_REGION is called. If the number of regions found is large, then it will exceed the UINT variable that labels the regions. A CATCH error handler in REGION_GROW is suppose to spot this and change the variable type to ULONG, but that doesn't seem to happen. Can you suggest a work-around?
![]()
ANSWER: It appears that IDL is checking the wrong error code on line 125 of REGION_GROW. The error message is is check for is -512, “Inconsistent coordinate bounds”, when it should be checking for error code -496, “32-bit sort not possible on this number of elements.” Changing the value from -512 to -496 seems to solve the problem.
![]()
Version of IDL used to prepare this article: IDL 7.0.1.
![]()
Copyright © 2008 David W. Fanning
Last Updated 04 February 2008