Introduction

The purpose of this webpage is to document my tests to get 3D view of Karttapullautin maps using three.js. I am planning to follow the work from the ThematicMapping blog and apply it on Pullatuin data.

Background

For test purposes, I got LIDAR + FKB-data (buildings, roads, rivers, lakes etc.) for an area north of Bergen in Norway. The LIDAR data is on LAS-format and the FKB data is on a Norway specific SOSI format. The making an orienteering map of this is described here - now I want to show this in 3D in the browser.

Simple test: 10m data from Kartverket

First up is to repeat the work of the ThematicMapping blog - but with data from the area of interest. For the gdal stuff I use the FWTools windows binary which was linked to in the Attackpoing discussion (note, only the mirror download site worked when I tried to download it).

Karttapullautin: Single tile

The process for a single Karttapullautin tile is not much more difficult. I use this laz-file which I renamed to "laztest.laz". I decided to take the easy way and just convert from the LAZ-format to the DEM format which was used for the first sample. There might be other / easier ways to do it, but I decided to make it easy for myself first.

So here is how I did it:

Adding hillshading

Adding hillshading should be fairly easy. See this 3D model of the Pullautin tile with hillshading Some comments about hillshading:

Note that for generating nice looking hillshaded DTMs it is often it is better to first create an elevation raster in BIL format and then hillshade this raster. Why? Because shading the (often small and irregular) triangles is lightly to generate jitter and aliasing during the lighting computation of the (often instable) surface normals of the (often tiny or slivery) triangles. After rasterization onto a BIL the LiDAR gets essentially resampled and using these regular spaced points avoids all these shading irregularities. Hence instead of las2dem -i lidar.laz -keep_class 2 -hillshade -o dtm.png try running las2dem -i lidar.laz -keep_class 2 -o dtm.bil las2dem -i dtm.bil -hillshade -o dtm.png

Complete map and/or part of map

The final step is to take a complete map / several tiles and/or a normal orienteering map. As long as my las-file (and therefore the resulting bin-file) is exactly the same size as the full orienteering map/Pullautin map, everything should be 100% OK and no change is needed for the procedure. It should be possible to do this for any Pullautin map. For a normal orienteering map, I need to be a bit more careful, but that should be possible as well.

Edit: Turns out it should be possible to work directly with xyz-files without converting from laz to dem using e.g. this or this. I won't dive into this now, but maybe later some time... Maybe one could even get the elevation data from a WMS-server like they do here. This would only give the 10m data and not the accurate elevation data used in the Pullautin generation, but would still be quite elegant. Note that it also looks like I can get the 10m data for Norway directly using vrt-files in GDAL.

Edit 2: Looking a bit further, I also found this nice service for plotting a GPS-track in Norway on a 3D map - some nice elements there also.

Following a track / rotation

Useful links: