[gdal-dev] Finding if a source exists in particular block of a VRTRasterBand
even.rouault at mines-paris.org
Thu Mar 14 00:05:51 PDT 2013
Le jeudi 14 mars 2013 05:18:17, ryagz a écrit :
> I have created a VRTDataset and added multiple simple sources to its
> rasterbands in a function of my application. In another function i have the
> instance of this VRTDataset and its VRTRasterbands and, Now i would like to
> find for a particular offsets an dimensions if there exists a source in
> I did not find any API functions to do this operations, so thought to call
> functions from the classes and tried the code like bellow:
> GDALRasterBand* preBand = dataSource->GetRasterBand(1);
> VRTSourcedRasterBand* Vrtband =
> int hasValidSource = 0;
> for(int srcIndex = 0; srcIndex < Vrtband->nSources; srcIndex++)
> VRTSimpleSource* simpleSource =
> hasValidSource = simpleSource->GetSrcDstWindow(xoff, yoff, read_size,
> read_size, read_size, read_size, &nReqXOff, &nReqYOff,
> &nReqXSize, &nReqYSize, &nOutXOff, &nOutYOff, &nOutXSize, &nOutYSize );
> To do this operation, the problem i am facing is VRTSimpleSource class is
> not exported and so the function GetSrcDstWindow() is throwing a linker
> Is there any way to solve this issue?
> Or Is there any API function which does this operation?
You can look at the gdallocationinfo source code to see how it manages to
retrieve the source file :
$ gdallocationinfo byte.vrt 0 0
Migth require GDAL 1.9 at least.
> View this message in context:
> ar-block-of-a-VRTRasterBand-tp5040251.html Sent from the GDAL - Dev mailing
> list archive at Nabble.com.
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev