I’m having an issue with Mapzen DEM using OGC requests. Regardless of which datatype I request the DEM as, the resulting array is always UInt-8.
I have followed the walkthrough here and have a layer set up correctly with the configuration utility.
Code snippet for testing:
import sentinelhub as sh
config = sh.SHConfig()
config.sh_client_id = client_id
config.sh_client_secret = client_secret
config.instance_id = dem_instance
tile = sh.BBox(((105.2571090326396, -3.0002457687621074), (105.47224815156255, -2.7577454582021694)), crs=sh.CRS('4326'))
size = sh.bbox_to_dimensions(tile, resolution=20) # tuple (width, height)
width = sizez0]
height = sizez1]
# make the request, specifically asking for a 32-bit TIFF
wms_request_dem = sh.WmsRequest(
layer='DEM',
data_source=sh.DataSource.DEM,
bbox=tile,
width=width,
height=height,
image_format=sh.MimeType.TIFF_d32f,
custom_url_params={sh.CustomUrlParam.SHOWLOGO: False},
config=config
)
dem = wms_request_dem.get_data()(0]
print("Requested image format: {}".format(wms_request_dem.image_format))
print("np array dtype is {}".format(dem.dtype))
This returns:
Requested image format: MimeType.TIFF_d32f
np array dtype is uint8
Any idea on the source of this error? It seemed to be working fine a week ago.