[gdal-dev] GDAL WMTS Driver - How do you control the Tile Matrix Set's Tile Level?

esacree esacree at knology.net
Thu Nov 10 15:48:17 PST 2016


WMTS request is set up in the XML file. That I posted a few days ago in the
message chain.
The data set rasterio call has width=2048, height=1024, bands=4.

The call to rasterio does take some time.  Acts like it is trying to get the
data.
But the data comes back black (all zeroes).

I have debugged into GDAL 2.1.1 code.  The input data buffer is being
cleared to 0.  The tile data is 256x256 and it is black.  GDAL does not
return an error code.

I used ArcGIS to reproject my LAS data to EPSG:3857 to exactly match the
WMTS image data without needing to reproject the image.  EPSG:3857 WMTS
requested coordinates match LAS data.  Similar WMS data request on these
coordinates works fine.

GDAL code appears to be trying to copy the Tile data at line 352 in
rasterio.cpp function: GDALRasterBand::IRasterIO.
GDAL Code Snippet
    /* type to type conversion */

    if( eRWFlag == GF_Read )
                            
	GDALCopyWords( pabySrcBlock + iSrcOffset,
 eDataType, nBandDataSize,
   
                       ((GByte *) pData) + iBufOffset + (GPtrDiff_t)k *
nLineSpace,

		      eBufType, (int)nPixelSpace, nXSpan );


Question:  Why is the WMTS tile data black?  Why is there no error?


Stack trace in GDALRasterBand::IRasterIO:  Around line 307 in file
rasterio.cpp:

>	gdal201d.dll!GDALRasterBand::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, __int64 nPixelSpace, __int64 nLineSpace,
GDALRasterIOExtraArg * psExtraArg) Line 320	C++
 	gdal201d.dll!GDALDataset::BlockBasedRasterIO(GDALRWFlag eRWFlag, int
nXOff, int nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int
nBufYSize, GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 2935	C++
 	gdal201d.dll!GDALDataset::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 1527	C++
 	gdal201d.dll!GDALWMSDataset::IRasterIO(GDALRWFlag rw, int x0, int y0, int
sx, int sy, void * buffer, int bsx, int bsy, GDALDataType bdt, int
band_count, int * band_map, __int64 nPixelSpace, __int64 nLineSpace, __int64
nBandSpace, GDALRasterIOExtraArg * psExtraArg) Line 571	C++
 	gdal201d.dll!GDALDataset::RasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 1997	C++
 	gdal201d.dll!VRTSimpleSource::DatasetRasterIO(int nXOff, int nYOff, int
nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize, GDALDataType
eBufType, int nBandCount, int * panBandMap, __int64 nPixelSpace, __int64
nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg * psExtraArgIn) Line
1411	C++
 	gdal201d.dll!VRTDataset::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 1517	C++
 	gdal201d.dll!GDALDataset::RasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 1997	C++
 	gdal201d.dll!WMTSDataset::IRasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 484	C++
 	gdal201d.dll!GDALDataset::RasterIO(GDALRWFlag eRWFlag, int nXOff, int
nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize,
GDALDataType eBufType, int nBandCount, int * panBandMap, __int64
nPixelSpace, __int64 nLineSpace, __int64 nBandSpace, GDALRasterIOExtraArg *
psExtraArg) Line 1997	C++
 	LASSymbols.dll!LayerUpdateProc(void * lpParameter) Line 2179	C++




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GDAL-WMTS-Driver-How-do-you-control-the-Tile-Matrix-Set-s-Tile-Level-tp5294530p5295238.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list