Un tutorial în imagini: hexagoane 3D în QGIS

3 min read

Yesterday I have derived hexagons from a DEM resulted from LiDAR data, and rendered them in #Threejs using #QGIS and #Qgis2threejs. Here’s the process, so that I(you) don’t have to repeat it a thousand times to succeed. 😀

Create a polygon layer and draw a hexagon, then export the raster pixels that intersect it using a layer mask.

Create a hexagonal grid with the horizontal and vertical spacing of 50m, using the extent from the clipped raster, and update the polygons with the maximum height value from the initial raster pixels, using Zonal statistics.

Create a new ‘rel_height’ field and update it with the minimum height value from the raster, filter the grid to exclude the cells without values, and export the filtered cells.

Rasterize the filtered layer (‘rel_height’ for burn-in value, 0.5 for horizontal and vertical resolution, ‘Georeferenced units’ as output units, and the extent from the filtered layer), then style the resulted raster to examine it.

Use Qgis2threejs to setup and export the scene to the web. First, increase the resampling level and add edges to highlight the hexagons.

Then add a new layer to #QGIS, #OpenStreetMap tiles, set the filtered layer general opacity to 0 to allow #Qgis2threejs to pick up the background colors, export the scene to web with the option ‘Enable the viewer to run locally’ checked, and view the result in the browser.

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *