[gdal-dev] WMS, blocksize and black lines

Arno Gerretsen arno at agerrius.nl
Sun Jul 15 05:40:36 PDT 2018


Just a little follow-up on this. I found another WMS server with the 
same images and it doesn't show these black lines. So I guess it is also 
something with this specific WMS server and not in GDAL.

Arno


On 2018-07-10 07:46, Arno Gerretsen wrote:
> Chris,
> 
> Thanks for the answer, if I put the window in the XML file it indeed
> also works for me.
> 
> But in my application I am sampling the GDAL dataset from code and
> setting a different window each time from code as well. So to modify
> the WMS XML every time in that case would not really be a work able
> solution.
> 
> This approach worked fine in the past with another WMS server, so I
> was hoping I missed some setting somewhere or so. I'll do some more
> experimentation.
> 
> Arno
> 
> 
> On 2018-07-10 07:04, Chris Smemoe wrote:
>> Arno,
>> 
>> I suspect the black lines has something to do with using the -projwin
>> argument to gdal_translate along with the DataWindow tag information 
>> in the
>> XML file.  The following XML works fine for me with the following 
>> command
>> line: "gdal_translate wms.xml test.tif"
>> 
>> <GDAL_WMS>
>>    <Service name="WMS">
>>      <Version>1.1.1</Version>
>> 
>> <ServerUrl>https://gis.apfo.usda.gov/arcgis/services/NAIP/Illinois/ImageServ
>> er/WMSServer</ServerUrl>
>>      <ImageFormat>tiff</ImageFormat>
>>      <Layers>0</Layers>
>>      <BBoxOrder>xyXY</BBoxOrder>
>>      <SRS>EPSG:4326</SRS>
>>    </Service>
>>    <DataWindow>
>>      <UpperLeftX>-89.0</UpperLeftX>
>>      <UpperLeftY>42.0</UpperLeftY>
>>      <LowerRightX>-88.0</LowerRightX>
>>      <LowerRightY>41.0</LowerRightY>
>>      <SizeX>1024</SizeX>
>>      <SizeY>1024</SizeY>
>>    </DataWindow>
>>    <UnsafeSSL>true</UnsafeSSL>
>> </GDAL_WMS>
>> 
>> Chris
>> 
>> -----Original Message-----
>> From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of 
>> Arno
>> Gerretsen
>> Sent: Monday, July 09, 2018 12:01 PM
>> To: gdal-dev at lists.osgeo.org
>> Subject: [gdal-dev] WMS, blocksize and black lines
>> 
>> Hi all,
>> 
>> I'm trying to create a WMS XML to access some WMS data in GDAL. But I
>> get black lines in the resulting image. I have found out that if I
>> reduce the size of the BlockSize in the WMS XML that the lines get 
>> more
>> narrow, but the download speed of the images also reduces a lot. Am I
>> missing some setting here to make it work?
>> 
>> This is the XML file I use:
>> 
>> <GDAL_WMS>
>>    <Service name="WMS">
>>      <Version>1.1.1</Version>
>> 
>> <ServerUrl>https://gis.apfo.usda.gov/arcgis/services/NAIP/Illinois/ImageServ
>> er/WMSServer?SERVICE=WMS</ServerUrl>
>>      <Layers>0</Layers>
>>      <SRS>EPSG:4326</SRS>
>>      <ImageFormat>image/tiff</ImageFormat>
>>      <Transparent>FALSE</Transparent>
>>      <BBoxOrder>xyXY</BBoxOrder>
>>    </Service>
>>    <DataWindow>
>>      <UpperLeftX>-91.562525</UpperLeftX>
>>      <UpperLeftY>42.562525</UpperLeftY>
>>      <LowerRightX>-87.437470</LowerRightX>
>>      <LowerRightY>36.937474</LowerRightY>
>> 	<SizeX>370834</SizeX>
>>      <SizeY>625056</SizeY>
>>    </DataWindow>
>>    <BandsCount>4</BandsCount>
>>    <UnsafeSSL>true</UnsafeSSL>
>>    <BlockSizeX>1024</BlockSizeX>
>>    <BlockSizeY>1024</BlockSizeY>
>> </GDAL_WMS>
>> 
>> And this is a sample call that shows the black lines:
>> 
>> gdal_translate -projwin -88.0 42.0 -87.99 41.99 wms.xml test.tif
>> 
>> With regards,

-- 
Arno


More information about the gdal-dev mailing list