Register | Login
Attackpoint - performance and training tools for orienteering athletes

Discussion: Karttapullautin in Linux (Ubuntu)

in: Orienteering; General

Sep 16, 2021 8:42 AM # 
camd:
Has anyone successfully managed to compile and run Karttapullautin in Linux (Ubuntu)? I'm trying to compile the script per instructions. While I have managed to compile both Lastools and Karttapullautin, when I attempt to process a LiDAR tile it shows the following:
Preparing input file
.......... done.
Knoll detection part 1

Knoll detection part 2

Ie after preparing the input file, it skips through the remaining actions and generates no outputs. See screenshot here: https://drive.google.com/file/d/1cUrXKcTfDAp8A4H_C...

The temp folder is generated with xyz2.xyz file inside but it is empty. No other files are generated. Settings are the standard set it comes with unchanged.
Advertisement  
Sep 16, 2021 8:08 PM # 
linville:
I've got it working on both macOS and Linux (Ubuntu). The main problem is many hard-coded Windows line-endings.

I've put my changes up on GitHub. I also created a GitHub Action workflow that creates a Perl "PAR" file which is basically just a single executable with KP, all the Perl dependencies and Perl executable wrapped up together to make it easy to use.
Sep 16, 2021 8:42 PM # 
HidingControls:
Cam have flicked you an e-mail (I think) I work for NeSI (https://www.nesi.org.nz/), not sure how or if we could ever get in on the platform but I have a few thousand CPUs available to test :D
Sep 16, 2021 9:28 PM # 
camd:
Cheers Aaron! I've just gone through and removed as many of the windows line-endings as I could find - got the main script working however the shapefiles aren't rendering. I'll try your version.

Matt, I got your email, have sent a reply. Would be epic to have a few thousand CPUs firing away at the data - even an hour or two would put a nice dent in the backlog of data!
Sep 17, 2021 2:00 AM # 
camd:
Hi Aaron, I wasn't able to get your script working - I believe something to do with the my file path for inputting and exporting files in batch mode. Suspect if I do get it working I'll encounter the same shapefile issues - see below.

I was able to get a script working in batch mode by fixing all the windows line-endings and removing some checks/transformations of paths. However, I have been unable to get the shapefiles to render. Checked and the script is definitely opening the ZIP with OSM shapefiles in it, it also seems to be reading the files ok from what I can tell. Yet roads etc are not rendering in the output. There are no errors.

Has anyone else encountered this? Any ideas for a fix? I'm loath to try debugging 2000 lines of code for what is probably a simple fix.
Sep 17, 2021 11:14 AM # 
camd:
Managed to get it working and my workflow established in Linux - yay!

Happy to share if anyone comes across this thread looking to replicate what I have done. My workflow is designed so that many independent PCs/VMs can collaboratively process huge areas of LiDAR into Mapant like solutions. We are using it in NZ to process our national LiDAR data into a version of Mapant - using volunteered home PCs rather than renting VM cores, to make it for *free*.
Sep 17, 2021 4:37 PM # 
cmorse:
Cam - I would be interested in your 'fixed' version. I tried to get it running under Ubuntu/Pop OS a couple years ago, ran into similar issues. Wound up using a convoluted series of scripts for a while, but that was inconvenient. At this point I run KP on a headless windows machine I keep around for solely for KP and PurplePen and then transfer pertinent files back to my linux machine over the network. You can reach me at clinton.morse@orienteeringusa.org. Thanks for offering..
Nov 30, 2021 6:41 PM # 
dbakker:
Cam, can I get your fixed version too please? Email in my Attackpoint Profile. Thanks!
Dec 2, 2021 10:05 AM # 
Terje Mathisen:
That's nice Cam! We did rent some cores for mapant.no, but the main cost we had was the Synology NAS with drives to hold ~50TB. I do all the preliminary block building (since the Norwegian Mapping Authority doesn't deliver complete tiles, only raw individual lidar projects), then Henning, Jan & I run Henning's Docker image which does all the KP stuff and merging with official topo vector data. We had to extend this with up to 100 cloud instances during the peak period when we processed over 25K km^2 per day.
Apr 6, 2023 1:35 PM # 
rphlo:
For those willing to run Karttapullautin in 2023, I made a fork that runs both on linux and mac that is faster than original script.
For the speed improvement we are talking, what used to take 23 minutes now run in 6minutes 30 sec.
If you want to test https://github.com/rphlo/rusty-pullauta
Apr 6, 2023 6:38 PM # 
Cristina:
!
Apr 8, 2023 6:20 AM # 
Terje Mathisen:
Thanks rphlo! We will definitely take look at your improvements since we will be reprocessing more or less everything for the next release. :-)

This discussion thread is closed.