[Gdal-dev] Need help with GDALGetOpenDatasets
Frank Warmerdam
fwarmerdam at gmail.com
Wed Jan 26 16:39:15 EST 2005
On Wed, 26 Jan 2005 16:24:02 -0500, William Lyons
<wlyons at prologic-inc.com> wrote:
>
> Hi List,
>
> I was wondering how one would go about using the GDALGetOpenDatasets
> function.
>
> void GDALGetOpenDatasets( GDALDatasetH *** hDS, int * pnCount )
>
> I'm fine with a pointer to a data type. Heck, I'll even use pointers to
> pointers to data types but….
>
>
>
> A pointer to a pointer to a pointer to a thing that is typedef-ed as a void
> pointer makes my mind circle the abyss.
William,
This is without testing, but I think it works like this:
GDALDatasetH *paphList;
int nCount, i;
GDALGetOpenDatasets( &paphList, &nCount );
for( i = 0; i < nCount; i++ )
{
GDALDatasetH hDS = paphList[i];
printf( "dataset name = %s\n",
GDALGetDescription( hDS ) );
}
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list