Is it possible to get via a geoservice the AHN3 or AHN2 as an array of pixel height values?

I would like to get an array of the height values from the ahn3 or ahn2.

Yes.
Using the Web Coverage Service (WCS).
Example:
https://geodata.nationaalgeoregister.nl/ahn2/wcs?service=WCS&version=2.0.1&request=GetCoverage&coverageId=ahn2_05m_int&format=GEOTIFF_FLOAT32&subset=x(202752%2C204800)&subset=y(497664%2C499712)&subsettingCrs=http://www.opengis.net/def/crs/EPSG/0/28992&scalesize=x(2049),y(2049)&compression=NONE

The result is a geotif you can load in to QGIS.

2 likes

Hi David, thank you for your reply, why is the geotiff not being displayed in the browser like the wms images? Is it because geotiff is not supported by webbrowsers? Because I would prefer to have the data directly instead of having to load files from my program… Ideally I would like a string format like the bag wfs services. Is it something that I can do in the WCS request URL?

Thank you!

Geotiff is just a tiff with some extra attributes.
Browsers don’t support TIFF in general.

As far as I know, no, the geotiff format is the only way to get the actual height values.
I use libtiff to read the pixel values.

1 like

Thank you for your reply! that’s useful information, I will look deeper into the geotiff.

Kan dit ook met wcs gdal XML bestand worden gerealiseerd?