Deploy the Run Scripts

In order to run the r:trån scripts in deployment environments, kscript needs to be installed. kscript provides enhanced scripting support for Kotlin and is capable of executing the *.kts scripts contained in this directory.

To execute the scripts, you can either install kscript directly on the system or use a Docker container that comes with kscript preinstalled.

Via a direct kscript installation

sdkman is a tool for managing software development kits and conveniently installs kotlin and kscript:

curl -s "" | bash     # install sdkman
source "$HOME/.sdkman/bin/"  # add sdkman to PATH

sdk install java 11.0.12-zulu # install java
sdk install kotlin # install Kotlin
sdk install kscript # install kscript

If you are on Windows, the deployment via docker is recommended.

Once the environment is ready, the r:trån scripts can be executed:

# download the script ...
curl --output convert-opendrive-to-citygml2-simple.kts

# and simply execute it (dependencies are resolved automatically)
kscript ./convert-opendrive-to-citygml2-simple.kts

Via Docker

With a docker installation, the run scripts can be executed using the r:trån container. First, download the example script:

curl \
    --output convert-opendrive-to-citygml2-simple.kts

Then, adapt /adjust/path/... to your host system's paths and run the execution:

docker run -i --name rtron --rm \
           -v /adjust/path/to/input-datasets:/project/input \
           -v /adjust/path/to/output-datasets:/project/output \
           rtron/rtron - < /adjust/path/to/convert-opendrive-to-citygml2-simple.kts

Also note that the script must now reference paths in the container file system (/project/input, /project/output).

To cancel the process, run this command in another terminal:

docker rm -f rtron