[gdal-dev] Display ADRG data with multiple subdatasets

Ayhan TEKGÜL ayhan.tekgul at netcad.com.tr
Sun Dec 27 11:28:25 EST 2009


Hi Even,
The dump results are in the zip file attached.

Best regards...

Ayhan TEKGÜL

----- Original Message ----- 
From: "Even Rouault" <even.rouault at mines-paris.org>
To: "Ayhan TEKGÜL" <ayhan.tekgul at netcad.com.tr>
Cc: <gdal-dev at lists.osgeo.org>
Sent: Sunday, December 27, 2009 4:39 PM
Subject: Re: [gdal-dev] Display ADRG data with multiple subdatasets


> Ayhan,
>
> this obviously confirms that ADRG subdataset was never tested before.  I'd 
> be willing to improve the support for them in GDAL itself rather than 
> forcing each user to use their little own hacks.
>
> The ADRG driver cannot currently open directly the .IMG files, but I 
> suspect this would be propably the right thing to do for subdataset 
> access. This might be probably something similar to what is suggested for 
> the ASRP/USRP driver in http://trac.osgeo.org/gdal/ticket/3194
>
> If I could have access to your data, it will be of course the most 
> convenient solution. Otherwise could you list all the filenames of your 
> ADRG product (from what you say I suspect there's only one GEN file but 
> several IMG files ?). What would also greatly help is that you provide the 
> output of the '8211dump' utility on both the .THF and .GEN files. The 
> source for this utility is in the frmts/iso8211 subdirectory of GDAL 
> source distribution. If you cd into this directory and do 'make 8211dump' 
> (on Linux), it should get compiled (but you might need to try this on 
> gdal-trunk, as I'm not sure the GNUmakefile in the 1.5 branch will compile 
> it without a few changes).
>
> Even
>
> Ayhan TEKGÜL a écrit :
>> Hi Even,
>>
>> When I check gdalinfo for transh01.thf file, the result is,
>> -------------------------------------------------------
>> Driver: ADRG/ARC Digitized Raster Graphics
>> Files: transh01.thf
>> Size is 13696, 2944
>> Coordinate System is:
>> GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 
>> 84",6378137,298.257223563]],
>>    PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], 
>> AUTHORITY["EPSG","4326"]]
>> Origin = (-10.588233333333333,52.738852777777780)
>> Pixel Size = (0.005908613445378,-0.004478503184713)
>> Band number: 3
>> Metadata:
>>  ADRG_SCA=5000000
>>  ADRG_NAM=GNUR0102
>> Corner Coordinates:
>> Upper Left  ( -10.5882333,  52.7388528) ( 10d35'17.64"W, 52d44'19.87"N)
>> Lower Left  ( -10.5882333,  39.5541394) ( 10d35'17.64"W, 39d33'14.90"N)
>> Upper Right (  70.3361364,  52.7388528) ( 70d20'10.09"E, 52d44'19.87"N)
>> Lower Right (  70.3361364,  39.5541394) ( 70d20'10.09"E, 39d33'14.90"N)
>> Center      (  29.8739515,  46.1464961) ( 29d52'26.23"E, 46d 8'47.39"N)
>> Band 1 Block=128x128 Type=Byte, ColorInterp=Red
>>  NoData Value=0
>> Band 2 Block=128x128 Type=Byte, ColorInterp=Green
>>  NoData Value=0
>> Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
>>  NoData Value=0
>> ------------------------------------------------------------------------------------
>>
>>
>> When I check gdalinfo for gnur0101.gen file, the result is,
>> -----------------------------------------------------------------------------------
>>
>> Driver: ADRG/ARC Digitized Raster Graphics
>> Files: gnur0101.gen
>> Size is 13696, 2944
>> Coordinate System is:
>> GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 
>> 84",6378137,298.257223563]],
>>    PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], 
>> AUTHORITY["EPSG","4326"]]
>> Origin = (-10.588233333333333,52.738852777777780)
>> Pixel Size = (0.005908613445378,-0.004478503184713)
>> Band number: 3
>> Metadata:
>>  ADRG_SCA=5000000
>>  ADRG_NAM=GNUR0102
>> Corner Coordinates:
>> Upper Left  ( -10.5882333,  52.7388528) ( 10d35'17.64"W, 52d44'19.87"N)
>> Lower Left  ( -10.5882333,  39.5541394) ( 10d35'17.64"W, 39d33'14.90"N)
>> Upper Right (  70.3361364,  52.7388528) ( 70d20'10.09"E, 52d44'19.87"N)
>> Lower Right (  70.3361364,  39.5541394) ( 70d20'10.09"E, 39d33'14.90"N)
>> Center      (  29.8739515,  46.1464961) ( 29d52'26.23"E, 46d 8'47.39"N)
>> Band 1 Block=128x128 Type=Byte, ColorInterp=Red
>>  NoData Value=0
>> Band 2 Block=128x128 Type=Byte, ColorInterp=Green
>>  NoData Value=0
>> Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
>>  NoData Value=0
>> --------------------------------------------------------------------------------------
>>
>>
>> There are 4 subdatasets, but gdalinfo shows just the first one in 
>> metadata as ADRG_NAM=GNUR0102 with size 13696, 2944
>>
>> In ADRGDataset::GetGENListFromTHF function of adrgdataset.cpp file, I 
>> tried to catch IMG files and add to fileNames. Then gdalinfo showed all 
>> the img files in subdatasets metadata.
>>
>> But this time GDALGetRasterCount gives 0 band. Because in 
>> ADRGDataset::Open function, when count of fileNames is bigger than 1, all 
>> fileNames[i] are being added as subdatasets to poDS and poDS returns 
>> without nBands are set.
>>
>> As I understand that, when subdatasets exist, subdataset files should be 
>> handled separately. But gdalinfo does not recognize the subdataset files 
>> (xxx.img).
>>
>> So maybe I should handle the adrg data, which has multiple subdatasets, 
>> by my own code. But this is not a convenient way of reading adrg data.
>>
>> Best regards...
>>
>> Ayhan TEKGÜL
>>
>> ----- Original Message ----- From: "Even Rouault" 
>> <even.rouault at mines-paris.org>
>> To: "Ayhan TEKGÜL" <ayhan.tekgul at netcad.com.tr>
>> Cc: <gdal-dev at lists.osgeo.org>
>> Sent: Saturday, December 26, 2009 8:10 PM
>> Subject: Re: [gdal-dev] Display ADRG data with multiple subdatasets
>>
>>
>>> Ayhan,
>>>
>>> the driver has support for ADRG subdatasets (although I'm not 100% 
>>> positive this has been tested). Theoretically, if you do a gdalinfo on 
>>> the .THF file and it has several subdatasets, they should be listed. But 
>>> basically the list is just the list of related .GEN files, so you can 
>>> directly do gdalinfo on the .GEN files.
>>>
>>> Best regards,
>>>
>>> Even
>>>
>>> Ayhan TEKGÜL a écrit :
>>>> Hi, all;
>>>>  I am using gdal-1.5.0 to display ADRG data. But when ADRG data has 
>>>> multiple subdatasets, I can display just one image.
>>>>  I have tried to search the wiki and gdal-dev archives, but I cannot 
>>>> get any similar problem with this issue or solution to this problem. 
>>>> (Maybe I have missed.)
>>>>  Is there anybody who knows to display adrg data with multiple 
>>>> subdatasets?
>>>>  Best regards...
>>>>  Ayhan TEKGÜL
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>>
>>
>>
>>
>>
>
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adrg8211dump.zip
Type: application/octet-stream
Size: 5181 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091227/633b6530/adrg8211dump.obj


More information about the gdal-dev mailing list