Skip to main content

Lakkavokka is a JOSM plugin for digitizing indexed color images in a controlled manner. This tool is useful for semi-automated imports in ML/AI mapping pipelines.

Usage

The following steps requires you have JSOM ext_tools plugin installed.

  1. Make sure you have Python >3.8 and Pip installed:
$ python3 --version
Python 3.8.10

$ python3 -m pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
  1. Install Lakkavokka:
python3 -m pip install lakkavokka
  1. Setup external script in JOSM

Use Lakkavokka as a name and lakkavokka --lat {lat} --lon {lon} --zoom 16 --source /path/to/tiles/{zoom}/{x}/{y}.png as a command line.

Now, you can open your area in JOSM, enable Lakkavokka tool and click on the map. Lakkavokka will load the area around the clicked point and build a way nearest to the point. It doesn't matter if you click inside or outside the colored area. If the area is small enough, the way will be automatically closed. Otherwise, you can combine those line to the multipolygon later.

Command line options

--source TMS tiles source, can be either a file path template or URL template. Variables {zoom}, {x}, and {y} will be automatically substituted to tile coordinates

--buffer number of tiles around the clicked point to be loaded. Increasing this value will significantly increase required RAM and calculation time. You can adjust this setting according to your data. Most useful values are from 1 (default) to 3.

--simplify-factor simplification factor for the resulting geometry. You should adjust this setting according to your data if you're getting too many points or too coarse geometry.

--tags comma-separated list of tags to be added to generated ways. It's a good idea to add source tag to indicate other mappers that is an automated or semi-automated load of data.

--lat and --lon latitude and longitude of a clicked point

--zoom zoom of tiles will be processed. It may be different from the zoom level in JOSM but it should always match the best zoom of tiles.

Metadata

Release files for lakkavokka 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lakkavokka 0.1.0
File Size Uploaded
lakkavokka-0.1.0.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lakkavokka 0.1.0
File Interpreter ABI Platform
lakkavokka-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / lakkavokka-0.1.0.tar.gz

Download URL lakkavokka-0.1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c2519192ab7d896135ba1615ea5357a983ccfafcf37a05a10e6c26b7c2b20929
BLAKE2b-256 checksum
How to use checksums
b45b1009cfc74a1399f995aabe4620ae305863f61d062cf1c2257a787c0d638e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

Release files / lakkavokka-0.1.0-py3-none-any.whl

Download URL lakkavokka-0.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5daec493e7776992d92fda79abc96e26dcbc4b78b6f57d1fa47100e3257296ce
BLAKE2b-256 checksum
How to use checksums
2a0ed1aa03a9341cfca1ceb2877297617babe253806e15206b2ab7de14f1dbf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page