Category: NZTekonverse -> Scripting
-
HOWTO: Fix “python: no such file or directory” error with youtube-dl or other scripts
If you use Python scripts or apps that depend on python to run, you may see an error message similar to the following on Debian Bullseye (possibly other distributions or versions as well). This occurs because the python application has been replaced by python3 in Debian Bullseye and so the system cannot find anything simply…
-
Using Qgis Python Scripting in the NZ Rail Maps Project: 3 – Volumes Formatting
The third area of Qgis scripting for the NZ Rail Maps project is specifically focused on formatting the Volumes layout images and is used to generate a subtitle displayed in the title bar of each Volumes image. This subtitle informs the user of the year of each aerial image view that is part of the…
-
Using Qgis Python Scripting in the NZ Rail Maps Project: 1 – WebMaps
Good evening. As part of the development of the NZ Rail Maps Project, recently custom Python scripting has been incorporated into the main window GUI and Composer / Layout to speed up processing of various aspects. This is summarised in different sections below. In order to create the content of the NZRM WebMaps site, various…
-
Simple PHP Photo Gallery For NZ Rail Maps Volumes Site
The New Zealand Rail Maps Project aims to create free maps of the present and past national public railway network, which are produced and distributed by a variety of means, through several web sites. One of these is the Volumes site, and it is intended to distribute individual images that each represent a small part…
-
Install mb-util on Debian
I use a Python script called mb-util to build the mbtiles files for the NZ Rail Maps webmaps site. It takes the raw tiles and builds what is effectively a SQLite database that encapsulates the millions of little tiles into one file, which is much easier to handle for file storage and uploading, although slightly…
-
Python Scripting [7A]: Change File Modification Time on Map Images
This scripting project is a part of the NZ Rail Maps project. The aim is to change file modification times for a group of maps so that they follow a certain sequence when imported into Google Photos. In the NZ Rail Maps project, maps published at what is defined as the “Basic” level are produced…
-
Python Scripting: Planned Scripting Projects Update
Back in February this year I set out a list of planned scripting projects following my acquisition of Python programming skills. The sequence of planned or implemented projects to date is: NZ Rail Maps project script to copy a set of GIS raster layer files based on reading a QLR file produced by Qgis. Currently…
-
Python Scripting [6D]: Layer Sidecar Duplication & Renaming for NZ Rail Maps 4
Since we last looked at this topic a couple of months have gone by with everything working as expected when the duplicate script is used, both for duplicating sidecar files for layers that are the same size as the original and ones where the destination layer has been increased in size. The former is the…
-
Python Scripting [4D]: Exif Based Image Renaming 4
After testing the Exif renaming script for the past couple of weeks I have added a piece of code to check for collisions and rename any file that collides with an existing filename. With Exif data, the most likely cause of a filename collision is when a camera is set to shoot continuously and it…
-
Python Scripting [4C]: Exif Based Image Renaming 3
After letting this one slide for quite a while, I picked it up again yesterday and have completed most of the coding. This is the full code to date (barring any further modifications found to be needed after testing). The script is run from the directory that is to be acted upon and takes no…