Command-line JOSM plugin for digitizing indexed colors images
Project description
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.
- 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)
- Install Lakkavokka:
python3 -m pip install lakkavokka
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lakkavokka-0.1.0.tar.gz
.
File metadata
- Download URL: lakkavokka-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2519192ab7d896135ba1615ea5357a983ccfafcf37a05a10e6c26b7c2b20929 |
|
MD5 | 7a2163d6f70a0e2c7a62a8e9d72901c9 |
|
BLAKE2b-256 | b45b1009cfc74a1399f995aabe4620ae305863f61d062cf1c2257a787c0d638e |
File details
Details for the file lakkavokka-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: lakkavokka-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5daec493e7776992d92fda79abc96e26dcbc4b78b6f57d1fa47100e3257296ce |
|
MD5 | 4fe552b4410e35d3054f45824768c9cd |
|
BLAKE2b-256 | 2a0ed1aa03a9341cfca1ceb2877297617babe253806e15206b2ab7de14f1dbf2 |