[gdal-dev] Puzzled about gdal_translate return all white image...

Even Rouault even.rouault at spatialys.com
Sat Aug 21 06:45:21 PDT 2021


>
> Is there any way to check for this or protect against it from the 
> client side, or do you just have to be experienced with a given WMS 
> service?
Not much to do on the client side, except checking that if you got a 
all-white image, it is probably not what you want, and retry at a 
coarser resolution. I guess such a logic could potentially be 
implemented in the WMS driver, but it could cause confusion to  end 
users (the driver would have to upsample the downsampled request, and so 
the user might not realize that they didn't get data at the resolution 
they requested)
>
> Thanks again,
> carl
>
> On Sat, Aug 21, 2021 at 12:33 AM Even Rouault 
> <even.rouault at spatialys.com <mailto:even.rouault at spatialys.com>> wrote:
>
>     Nothing wrong from your side, but the second command probably
>     selects a higher zoom level that has blank data given the
>     configuration/data available on the server side.
>
>     Le 21/08/2021 à 03:36, Carl Godkin a écrit :
>>     Hi,
>>     I'm very puzzled about why gdal_translate (v. 3.3.1) returns an
>>     all-white image when I select a smaller area than with a working
>>     case with a larger area.
>>
>>     These two command lines are exactly the same except that the
>>     failing case has a smaller area:
>>
>>     gdal_translate
>>     "https://basemap.nationalmap.gov:443/arcgis/services/USGSImageryTopo/MapServer/WmsServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=0&SRS=EPSG:4326&BBOX=-179.999989,-89.000000,179.999988,89.000000
>>     <https://basemap.nationalmap.gov:443/arcgis/services/USGSImageryTopo/MapServer/WmsServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=0&SRS=EPSG:4326&BBOX=-179.999989,-89.000000,179.999988,89.000000>"
>>     wms.xml -of WMS
>>
>>     gdal_translate \
>>         -projwin 524136.39 5229915.17 527111.89 5226499.96 \
>>         -projwin_srs EPSG:32610 \
>>         -outsize 2500 0 \
>>         wms.xml fails.tif
>>
>>     gdal_translate \
>>         -projwin 517947.80 5235658.96 528189.82 5224344.74 \
>>         -projwin_srs EPSG:32610 \
>>         -outsize 2500 0 \
>>         wms.xml works.tif
>>
>>     Can anyone explain what's going on here and (most likely!) what
>>     I'm doing wrong?
>>
>>     Thank you very much,
>>
>>     carl
>>
>>     _______________________________________________
>>     gdal-dev mailing list
>>     gdal-dev at lists.osgeo.org  <mailto:gdal-dev at lists.osgeo.org>
>>     https://lists.osgeo.org/mailman/listinfo/gdal-dev  <https://lists.osgeo.org/mailman/listinfo/gdal-dev>
>
>     -- 
>     http://www.spatialys.com  <http://www.spatialys.com>
>     My software is free, but my time generally not.
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210821/8de76471/attachment-0001.html>


More information about the gdal-dev mailing list