Skip to main content

PyPI version

Commandline tools to upload discrete images to KartaView.

Also supports Vantrue OnDash X4S videos.

Usage

  1. Install:

    pip3 install kartaview-tools
  2. Authorize: This step is needed only once. You need an OSM account.

    kv_auth

    Your KartaView credentials are now stored in the file ~/.config/kartaview/credentials.json. Keep this file secret. The KartaView credentials do not expire, but you can delete the credentials file, in which case you must authorize again.

  3. Sequence the images:

    kv_sequence ~/Pictures/kartaview/*.jpg

    This step sorts your images into sequences. It extracts the GPS data from your images and stores it in sidecar files, where you can easily review it.

  4. Upload the images:

    kv_upload ~/Pictures/kartaview/*.jpg

    The script remembers which images were successfully uploaded. In case of errors, if you run the upload script on the same images again, the ones already uploaded will not be uploaded again.

Run the scripts with ‘-h’ to see more options.

Videos

This software only supports videos produced by the Vantrue OnDash X4S dashcam.

To split a video file into discrete images use ffmpeg.

Proposed workflow:

mkdir -p /tmp/frames
# extract I-frames for better clarity
ffmpeg -skip_frame nointra -i ~/Videos/dash.mp4 -vsync 0 -frame_pts 1 /tmp/frames/%08d.jpg
# patch GPS data into image files
kv_vantrue_x4s -i ~/Videos/dash.mp4 /tmp/frames/%08d.jpg
# sequence image files
kv_sequence /tmp/frames/%08d.jpg
# upload files
kv_upload /tmp/frames/%08d.jpg

See:

GPX Files

You can extract the GPS data in your video into a GPX file and then use third-party tools (eg. exiftool) to further process it.

Proposed workflow:

kv_vantrue_x4s -i ~/Videos/dash.mp4 --gpx=track.gpx
exiftool -geotag=track.gpx /tmp/frames

See: https://exiftool.org/geotag.html

Metadata

Release files for kartaview-tools 0.0.5

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

Source distribution (sdist)

Source distribution for kartaview-tools 0.0.5
File Size Uploaded
kartaview-tools-0.0.5.tar.gz 37.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kartaview-tools 0.0.5
File Interpreter ABI Platform
kartaview_tools-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 78.9 kB

Release files / kartaview-tools-0.0.5.tar.gz

Download URL kartaview-tools-0.0.5.tar.gz
Size 37.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4eda269817327a7c6d2a2bb244420fa02783ab68e518a8ffe4d7479de0a91d88
BLAKE2b-256 checksum
How to use checksums
3d80a01052851f7004de506b32d2949c42f0ace3472af06515348e1ac7b3e6cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / kartaview_tools-0.0.5-py3-none-any.whl

Download URL kartaview_tools-0.0.5-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
229f1d0b3bb53cadff98e9482ddda9431183c36e3615d49be7a0c9b628089cc5
BLAKE2b-256 checksum
How to use checksums
b236b005ce038f5ce7e23861d547a3ace96f3b36d6fdf65ffd33f75a89d7e91b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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