I'm trying to retrieve DSM/DTM data from UK DEFRA WMS services in order to render in 3D. My background is in programming rather than GIS, although I've been dabbling a bit for a little while.
I have previously downloaded a number of tiles in zipped ASC format, and have scripts for processing these and rendering them (side-note: I think DEFRA have started using GeoTIFF with 32bit floats for some more recent data sets, but I haven't had much luck interpreting that data - I haven't tried very hard thus far as I had a working pipeline for the ASC that was enough for initial experiments).
I haven't been able to find a way to acquire this format of data en-masse, and using the graphical interface to do so manually is quite laborious. I thought that querying via WMS should be able to get me what I want, but I can only get it to return coloured images geared towards human eyes, whereas I would like to have a single value representing some reasonably precise height (FWIW, I've been processing height read from ASC normalised into 24bit unsigned ints in JPEG2000 images, along with metadata about how to rescale to min/max elevation for each tile).
I am able to query the WMS, eg
https://environment.data.gov.uk/spatialdata/lidar-composite-digital-surface-model-dsm-1m/wms?service=WMS&
request=GetMap&version=1.3&layers=LIDAR_Composite_DSM_1m&
styles=&format=image/jpeg&transparent=false&height=500&width=500&
srs(crs)=EPSG:27700&bbox=448000.5, 129000.5, 448500.5, 129500.5
Other formats for GetMap
available, as per GetCapabilities
:
<GetMap>
<Format>image/bmp</Format>
<Format>image/jpeg</Format>
<Format>image/tiff</Format>
<Format>image/png</Format>
<Format>image/png8</Format>
<Format>image/png24</Format>
<Format>image/png32</Format>
<Format>image/gif</Format>
<Format>image/svg+xml</Format>
I'm pretty sure none of these are likely to be able to give me more than 8bits of information, and even then in a form requiring other processing. I imagine that styles
is a parameter that might sometimes be used for selecting a plain elevation representation rather than coloured, but I don't see evidence of any different styles being available in the GetCapabilities
output.
<GetFeatureInfo>
<Format>application/vnd.esri.wms_raw_xml</Format>
<Format>application/vnd.esri.wms_featureinfo_xml</Format>
<Format>application/vnd.ogc.wms_xml</Format>
<Format>application/geojson</Format>
<Format>text/xml</Format>
<Format>text/html</Format>
<Format>text/plain</Format>
Seems like it could be useful, but my attempts to query it all seem to return errors. e.g.
https://environment.data.gov.uk/spatialdata/lidar-composite-digital-surface-model-dsm-1m/wms?service=WMS&
request=GetFeatureInfo&version=1.3&layers=LIDAR_Composite_DSM_1m&
format=text/plain&height=500&width=500&srs(crs)=EPSG:27700&
bbox=448000.5, 129000.5, 448500.5, 129500.5&
InfoFormat=text/plain
yields
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ServiceExceptionReport version="1.3.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code="LayerNotDefined">
Parameter 'layers' can not be empty.
</ServiceException>
<ServiceException code="InvalidFormat">
Parameter 'InfoFormat' contains unacceptable value.
</ServiceException>
</ServiceExceptionReport>
for reasons I don't understand. I've tried a few different values for InfoFormat
& layers, but to no avail.
I'm still not quite sure whether a better formed query to GetFeatureInfo
will give me the data I'm after, or whether I need to persue other options anyway.
processed_relative_path: COMPOSITE_LIDAR\2019\Zip_Files\1m\DTM\LIDAR-DTM-1m-2019-SV80sw.zip
. I don't know if these files are exposed to the public internet, but if so, and if I could figure out what that path was relative to, I could scrape the data I want... Probably better to ask on their forum.