OWSLib icon indicating copy to clipboard operation
OWSLib copied to clipboard

Gaps in GeoTIFF image with wms.getmap

Open EWouters opened this issue 4 years ago • 0 comments

Hi,

I'm downloading some images from a wms source and saving them to GeoTIFF for further processing. However the downloaded images have many missing pixels.

Downloaded GeoTIFF: afbeelding

Original: afbeelding

This is the code I use to download the files:

            with open(file_name, 'wb') as outfile:
                img = wms.getmap(layers=[layerId],
                                styles=[style],
                                srs=bbox[4],
                                bbox=fragmentBbox,
                                size=(round((fragmentBbox[2]-fragmentBbox[0])/res_x), round((fragmentBbox[3]-fragmentBbox[1])/res_y)),
                                format='image/geotiff',
                                transparent=True,
                                timeout=30000
                                )
                outfile.write(img.read())

How can I fix the gaps? Is there a setting to fix this or is this a bug?

Thanks for any response :)

EWouters avatar Jun 28 '20 23:06 EWouters