[gdal-dev] Re: reading NOAA-19 AVHRR

Knut-Frode Dagestad knutfrodesoppel at hotmail.com
Thu Mar 1 08:34:12 EST 2012


Even,

Your suggestion sounds plausible is and probably both correct and 
necessary. But unfortunately it is still not working with your patch, so 
I guess there must be an additional problem.
Regardless of using the patch or not, and adding "--debug on" or not, 
the output from gdalinfo is:

 >gdalinfo --debug on avhrr_20120227_235800_noaa19.hrp
ERROR 4: `avhrr_20120227_235800_noaa19.hrp' not recognised as a 
supported file format.
gdalinfo failed - unable to open 'avhrr_20120227_235800_noaa19.hrp'.

After investigations, I have found one potential reason: According to 
this page, this file (from Eumetcast antenna) is in Big Endian format:
http://www.eumetsat.int/Home/Main/Satellites/GroundNetwork/EARSSystem/EARS-AVHRR/index.htm?l=en
("- For NOAA KLM and NN': HRPT data, expanded to 16 bits, big endian, 
bzip2 compressed.")

I see there are some old discussions related to endianness in GDAL:
http://lists.osgeo.org/pipermail/gdal-dev/2002-April/003355.html

and it is also mentioned in the driver tutorial:
http://www.gdal.org/gdal_drivertut.html  (keyword "bNativeOrder")

But I am not able to see how to fix this problem, and not sure if 
endianness is relevant at all? I could make available a sample file for 
anyone interested to look at the problem.

Best regards from Knut-Frode



On 28. feb. 2012 17:06, Even Rouault wrote:
> Knut-Frode,
>
> I've skimmed quickly through the driver code and if you are lucky, it is
> probably just a matter of changing a few lines (well, I can be wrong).
>
> If you have a debug build of GDAL, you can first try to run "gdalinfo --debug on
> avhrr_20120227_235800_noaa19.hrp" . My guess (based on
> http://en.wikipedia.org/wiki/NOAA-19 saying that NOAA-19 = NOAA-N' and NOOA-N'
> appearing in commented code of the driver...) would be that you would see :
> "Unknown spacecraft ID "8"".
>
> If so, you could test the following patch :
>
> Index: l1bdataset.cpp
> ===================================================================
> --- l1bdataset.cpp	(revision 24036)
> +++ l1bdataset.cpp	(working copy)
> @@ -61,6 +61,7 @@
>       NOAA16,     // NOAA-16(L)
>       NOAA17,     // NOAA-17(M)
>       NOAA18,     // NOAA-18(N)
> +    NOAA19,     // NOAA-19(N')
>       METOP2      // METOP-2(A)
>   };
>
> @@ -1025,10 +1026,10 @@
>               case 7:
>                   eSpacecraftID = NOAA18;
>                   break;
> -            /* FIXME: find appropriate samples and test these two cases:
> -             * case 8:
> -                eSpacecraftID = NOAA-N';
> +            case 8:
> +                eSpacecraftID = NOAA19;
>                   break;
> +            /* FIXME: find appropriate samples and test that case:
>               case 11:
>                   eSpacecraftID = METOP-1;
>                   break;*/
> @@ -1155,6 +1156,9 @@
>           case NOAA18:
>               pszText = "NOAA-18(N)";
>               break;
> +        case NOAA19:
> +            pszText = "NOAA-19(N')";
> +            break;
>           case METOP2:
>               pszText = "METOP-2(A)";
>               break;
>
> Perhaps Andrey Kiselev, the author of the driver, would have better clues.
>
> Best regards,
>
> Even




More information about the gdal-dev mailing list