[gdal-dev] WMTS gdal_translate vs RasterIO

Michał Kowalczuk michkowalczuk at gmail.com
Fri Aug 30 00:27:55 PDT 2024


Full GDAL log attached.
Sorry, but I do not know how to test your suggestion. GDAL logger creates
some caches and I do not know which http request i should use...

Thanks, Michał

pt., 30 sie 2024 o 09:23 Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>
napisał(a):

> Hi,
>
>
>
> Capture and show the http request that your code generates and sends to
> the WMTS server. Does it work if you send the same request with curl or
> with a browser? Or does the error come before the GetTile request is
> generated?
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* Michał Kowalczuk <michkowalczuk at gmail.com>
> *Lähetetty:* perjantai 30. elokuuta 2024 9.59
> *Vastaanottaja:* Robert Coup <robert.coup at koordinates.com>
> *Kopio:* gdal-dev at lists.osgeo.org; Rahkonen Jukka <
> jukka.rahkonen at maanmittauslaitos.fi>
> *Aihe:* Re: [gdal-dev] WMTS gdal_translate vs RasterIO
>
>
>
> Sorry for incorrect sample commands in the last message.
>
> I fixed it. The problem stays the same, because the problem was in email
> not in my tested code.
>
> *gdal_translate -srcwin 0 0 1073741760 1553779 -outsize 691 1
> "WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSHydroCached,tilematrixset=default028mm
> <https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSHydroCached,tilematrixset=default028mm>"
> tile.png*
>
>
>
> *GDALDatasetRasterIO(*
>
> *handle_to_wmts_subdataset,*
>
> *eRWFlag=GF_Read,*
>
> *nXOff=0,*
>
> *nYOff=0,*
>
> *nXSize=1073741760,*
>
> *nYSize=1553779,*
>
> *pBuffer - buffer for data,*
>
> *nBufXSize=691,*
>
> *nBufYSize=1,*
>
> *eBufType=GDT_Byte,*
>
> *nBandCount=4,*
>
> *panBandMap=[bIndex ,gIndex, rIndex, aIndex],*
>
> *nPixelSpace=4,*
>
> *nLineSpace=0,*
>
> *nBandSpace=1)*
>
>
>
> Can anyone help me to understand why gdal_translate works and generates
> output file, where GDALRasterIO raises error:
>
> *Requested (0,0) of size 1073741760x1553779 on raster of
> 1073741756x1347126255?*
>
>
>
> czw., 29 sie 2024 o 12:22 Michał Kowalczuk <michkowalczuk at gmail.com>
> napisał(a):
>
> I see. I will double check commands, fix and return to this.
>
>
>
> W dniu czw., 29.08.2024 o 12:20 Robert Coup <robert.coup at koordinates.com>
> napisał(a):
>
> Hi Michał,
>
>
> In addition to Jukka's key point:
>
>   nBufXSize=1,
>   nBufYSize=691,
>
> appears to be backwards wrt:
>
>
>   -outsize 691 1
>
>
>
> Rob :)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240830/8e802eb7/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: App.WebServices.log
Type: application/octet-stream
Size: 27505 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240830/8e802eb7/attachment-0001.obj>


More information about the gdal-dev mailing list