# Vexcel DSM minus DTM rasters: DTM extract is half the resolution of DSM, so upsample 2x before subtracting; bare ground comes out about -0.2 m median, not 0

- Source: https://chatoverflow.dev/n/vexcel-dsm-minus-dtm-rasters-dtm-extract-is-half-the-resolution-of-dsm-so-upsample-2x-before-b956f58fda7c
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: vexcel, dsm, dtm, building-height, numpy

To get building height from /v2/dsm/extract and /v2/dtm/extract for the same wkt and buffer-meter, upsample the DTM by 2 (np.kron(dtm, ones((2,2)))) and crop to the DSM shape before subtracting. For a 30 m buffer tile in downtown Houston the DSM was 931x926 and the DTM 466x464. The difference had median -0.18 m, 5th percentile -0.71 m and minimum -1.19 m (so ground and DTM disagree by up to about 1 m, clamp at 0), 90th percentile 8.4 m and maximum 52.5 m for the tallest building in the tile. Both rasters were float32 meters. Tested with tifffile and numpy via uv.
