Generating map inputs with Karttapullautin

Basic process

Generating orienteering map items with Karttapullautin is very simple. Just run the program and provide the input LiDAR file.

  • Open the Windows command prompt:Win + X then Command prompt
  • Navigate to the project folder: CD C:\GossanHill
  • Enter a command like this: pullauta Merged12.las
  • Over the next minutes (or hours) the program will produce this output:
Karttapullautin v. 20160405 (c) Jarkko Ryyppo 2012-16  All rights reserved.
This exe is free for non commercial use or if used for for navsport
mapping (orienteering, rogaining, adventure racing mapping).
There is no warranty. Use it at your own risk!
Preparing input file
.......... done.
Knoll detection part 1
.................... done.
Knoll detection part 2
........................ done.
Contour generation part 1
.................... done.
Contour generation part 2
.................... done.
Contour generation part 3
.................... done.
Contour generation part 4
.................... done.
Vegetation generation
.................... done.
Cliff generation
..........................done.
Rendering png map with depressions
....................... done.
Rendering png map without depressions
....................... done.
All done!

The main Karttapullautin outputs are saved in the project folder and in the temp sub-folder, and include:

  • Various .dxf files: c2g.dxf (passable cliffs), c3g.dxf (passable cliffs), contours03.dxf, detected.dxf, dotknolls.dxf, formlines.dxf, out.dxf, out2.dxf. I’ll use some of these later to create the map.
  • Some geo-referenced image files: blueblack.png, c2.png, pullautus.png, pullautus_depr.png, undergrowth.png, vegetation.png. I’ll use some of these later to create the map.
  • The pullautus_depr.png is the prettiest image to view. Here’s an example from my project. Karttapullautin colours the depressions purple to distinguish them from other contours.

Adjustments

There are lots of settings that you can adjust. They are all in the pullauta.ini text file. The settings file itself has some comments about possible adjustments. The documentation in the Karttapullautin download bundle explains more.

Processing time and file size

Larger LiDAR files take longer for Karttapullautin to process. Here are some timings from my rather under-powered laptop.

  • 1.1 Gb LiDAR file took 2 hours 20 minutes
  • 533 Mb LiDAR file took 1 hour 55 minutes
  • 138 Mb LiDAR file took 20 minutes

My laptop has an Intel Core m3–6Y30 CPU operating at 0.90 GHz, 8 Gb of physical memory, and runs Windows 10.

Here’s what the Windows 10 task manager reported about the processing load:

Input file size and output image quality

I ran Karttapullautin on several input files, all representing the same area. The files had been thinned to various extents. I compared the pullautus.png output from two Karttapullautin runs: one used unthinned LiDAR data, the other used a file with all but one-eighth of the data thinned out. I used the Resemble.js Image analysis and comparison online tool to check the differences.

The output was remarkably similar, especially considering one image was generated using just one-eighth the data available to the other. The resemble.js tool reports just a 6.41% variation between the images.

Scripting

Karttapullautin’s output files are left in a few places, and they are overwritten at the next run. In order to keep the files nice and neat, and to keep useful logs about processing, I created a processing script.

The script uses the wtee.exe program to send Karttapullautin’s progress messages to the screen and to a log file. You can get the wtee.exe program online. Place it in your project folder.

Copy and paste the following into a new text file (use Windows Notepad). Save it in your project folder. Use a .bat file extension. My script is saved as mapit.bat.

@ECHO OFF
IF NOT EXIST wtee.exe GOTO WTEEMISSING
IF NOT EXIST pullauta.exe GOTO PULLAUTAMISSING
IF NOT EXIST %1 GOTO INPUTMISSING
REM ** Select a datestamp for this run
REM ** Thanks to http://stackoverflow.com/a/1445724
REM ** May need to tweak this if your local date format isn't like "Fri 31/03/2017"
SET HOUR=%time:~0,2%
SET dtStamp9 =%date:~-4%%date:~7,2%%date:~4,2%_0%time:~1,1%%time:~3,2%%time:~6,2%
SET dtStamp24=%date:~-4%%date:~7,2%%date:~4,2%_%time:~0,2%%time:~3,2%%time:~6,2%
if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
REM ** Select a name for the output folder
REM ** Starts with the datestamp
REM ** Ends with the name of the input file, no extension, spaces changed to underscores
SET FILEMAME=%~n1
SET OUTPUTDIR=%dtStamp%_%FILEMAME: =_%
ECHO === Starting new job ===
ECHO Logfile: %dtStamp%_log.txt
ECHO Input file: %1
ECHO Input file: %1 >> %dtStamp%_log.txt
ECHO Using command: pullauta.exe %1
ECHO Using command: pullauta.exe %1 >> %dtStamp%_log.txt
ECHO Starting processing now - %DATE% %TIME%
ECHO Starting processing now - %DATE% %TIME% >> %dtStamp%_log.txt
pullauta.exe %1 | wtee %dtStamp%_pullauta_log.txt
TYPE %dtStamp%_pullauta_log.txt >> %dtStamp%_log.txt
ECHO Processing finished - %DATE% %TIME%
ECHO Processing finished - %DATE% %TIME% >> %dtStamp%_log.txt
ECHO Copying outputs to folder: %OUTPUTDIR%
ECHO Copying outputs to folder: %OUTPUTDIR% >> %dtStamp%_log.txt
IF EXIST temp XCOPY temp %OUTPUTDIR% /s /i
XCOPY pullautus* %OUTPUTDIR% /i
ECHO Job finished. >> %dtStamp%_log.txt
XCOPY %dtStamp%*.txt %OUTPUTDIR% /i
REM ** Delete some unnecessary files
DEL %OUTPUTDIR%\*.xyz
DEL %OUTPUTDIR%\temp_*
ECHO Job finished.
GOTO END
:INPUTMISSING
ECHO Usage: %~nx0 <input_file_name>
ECHO Expecting <input_file_name>, got: %1
ECHO Ending without processing anything.
GOTO END
:PULLAUTAMISSING
ECHO Could not find pullauta.exe. You can get it from http://www.routegadget.net/karttapullautin/
ECHO Ending without processing anything.
GOTO END
:WTEEMISSING
ECHO Could not find wtee.exe. You can get it from https://code.google.com/archive/p/wintee/downloads
ECHO Ending without processing anything.
GOTO END
:END

To run Karttapullautin using the script:

  • Open the Windows command prompt:Win + X then Command prompt
  • Navigate to the project folder: CD C:\GossanHill
  • Enter a command like this: mapit Merged12.las

This article is part of the Orienteering Mapping with LiDAR, Smartphones and Free Tools series.

Polite and constructive responses are always welcome.

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store