1

Topic: GCPS optimization error

In the process of optimizing the GCPs of a 10m resolution SPOT-3 scene, I get the following error message:

ENVI Retrieve Data: An error has occurred during processing

Error: "Array has too many elements." The result may be invalid.

Any idea what may be causing this?

Pieter

2

Re: GCPS optimization error

Update: The problem does not occur when the SPOT image is in a DIMAP (.dim) format.

The error message only appears when trying to optimize the GCPs of a .dat image.

Pieter

3

Re: GCPS optimization error

Hi Pieter,

The trivial answer would be for you to check the ENVI tile and cache size, but I'm sure you've already verified that.

That is very weird, because the GCP optimization does not consume much memory. How do you know that this pb does not occur in the dimap format? Do you have twice the same image in both CEOS and Dimap format?
When you opened the old SPOT 3 image in ENVI, did you use the Menu Open External File -> SPOT -> SPOT and selected the .dat file? When you built the ancillary data, did you select the .lead file?

A possibility (that we already encountered with old images), is that the metadata is corrupted and the coordinates send you some place crazy. If you try to ortho-rectify you image without GCP (use a bilinear kernel or a sinc of size 5 for the resampling so that it's fast), do you also run out of memory? what does the image looks like. Is it highly distorted?

Thanks,
Sebastien

4

Re: GCPS optimization error

Sebastien,

1. I have DIMAP and .DAT images for the same scene but taken at different times. The ancillary file was calculated from the .lead file. It is 1.1Mb in size, which is the same as the .anc files obtained from DIMAP scenes. However, the console produces the following output when calculating the ancillary file of a .DAT image:

% Type conversion error: Unable to convert given STRING to Integer.
% Detected at: LEADER_PARSER
[...]
% Type conversion error: Unable to convert given STRING to Integer.
% Detected at: LEADER_PARSER   
Values out of range: 49
Sun Elevation (degree) =        42.900000
Sun Azimuth (degree) =        166.30000

I do not get these messages when retrieving the ancillary file of a DIMAP scene.

2. The cache size is 200Mb and the tile size 40Mb. This arrangement works fine for the DIMAP files.

3. Orthorectifying does not work if I use either tie points or a DEM. Orthorectifying does work (no error message) if I just use the ancillary file and base the map grid on the georeferenced image. The resulting .mat file, however, only contains NaNs. If I use the raw image for the map grid, then I get the following error message:
"FSC_FIELD:SET_VALUE: Attempt to subscript OUTSTR with II is out of range."

4. Resampling never works, probably because of the NaNs in the mapping matrix.

Pieter

5

Re: GCPS optimization error

Hi Pieter,

The conversion error in the console for CEOS data is usually normal. It's simply that they allocate a certain size for the array of attitudes, but they don't always fill it completely, hence some warnings.

It is not normal that the .mat file contains NaN values. Then of course all subsequent processing must fail (e.g., resampling).

My guess is that some information is missing from the lead file. We've encountered a few cases on old SPOT images where some data were corrupted. That must be the case. From there, we can go 2 directions:

1- Contact SPOT image and put a request so they can regenerate the metadata (if they do that they'll probably send you the metadata in dimap format, I don't think they still generate CEOS format)

2- Send us the .lead file and we can try to see what's wrong. In some cases we have been able to infer the missing or corrupted parameters.

Sebastien