Skip to content

Instantly share code, notes, and snippets.

View timlinux's full-sized avatar

Tim Sutton timlinux

View GitHub Profile
@timlinux
timlinux / creating_3d_models_for_QGIS_with_ODM.md
Last active July 10, 2024 03:29
Creating 3D Models for QGIS With ODM

Capture a movie on your phone of the object by walking around it. If possible shoot it from different angles e.g. from above looking down, below looking up, side on etc. When you film it, walk around it or move the camera around it in a full 360 revolution (or even a couple of revolutions). You should get something like this (note that the image below is a resized copy of the orignal downrated to 1 fps):

DrinkingFountainSmall

Put the video into an empty folder and then use ffmpeg to extract the frames. You can experiment with different frame rates but generally there will be little value in extracting at 60fps or whatever your phone natively shoots at.

If you are on an iPhone you may need to convert your movie from .HEIC format first:

```
nix-shell -p whitebox-tools
this derivation will be built:
/nix/store/84wi7lcplbf8ryldn8qxhk6jk0qfjwdg-whitebox_tools-2.2.0.drv
these 3 paths will be fetched (0.00 MiB download, 0.02 MiB unpacked):
/nix/store/dqckr5s73zsy3jcqqp774x9y6fzjl0rc-auditable-cargo-1.73.0
/nix/store/by2qyxr78hh3jhrrx8sikgavr3i9ap07-cargo-build-hook.sh
/nix/store/vrvkmmbkxwk2zf0b45jcfa9kc1wx8z31-cargo-check-hook.sh
copying path '/nix/store/dqckr5s73zsy3jcqqp774x9y6fzjl0rc-auditable-cargo-1.73.0' from 'https://cache.nixos.org'...
graph TD
    A[Father] -->|Parent| B[You]
    C[Mother] -->|Parent| B[You]
    B -->|Husband| D[Wife]
    B -->|Father| E[Daughter]
    D -->|Mother| E[Daughter]
@timlinux
timlinux / README.md
Last active April 10, 2024 19:28
Linux on Lenovo Thinkpad P14s with AMD Processor

Thinkpad P14s AMD Edition Review (Running Fedora)

These are my installation etc. notes for running Linux on my new Thinkpad P14s laptop with 32GB RAM, 1TB SDD and 8 Core, 16 Thread AMD CPU.

Detailed specs

Here is what they quoted as the specs after I confirmed my order:

@timlinux
timlinux / bright.json
Last active January 28, 2024 23:32
TileMaker OpenMapTiles Bright Style
{
"version": 8,
"name": "Empty Style",
"metadata": {"maputnik:renderer": "mbgljs"},
"sources": {
"planet": {"type": "vector", "url": "http://localhost:8000/services/planet"}
},
"sprite": "",
"glyphs": "https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",
"layers": [
@timlinux
timlinux / coreos-docker.md
Last active January 27, 2024 13:02
Setting up a hetzner machine with coreos

This gist describes how to set up a new machine running coreos.

Create an ssh key

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_kartoza99

Get the public key:

@timlinux
timlinux / readme.md
Last active December 26, 2023 02:51
A simple attempt to make a spinning globe in QGIS by continuously manipulating the CRS.

QGIS Globe Spinner

A simple attempt to make a spinning globe in QGIS by continuously manipulating the CRS. Just load a world boundaries layer and run this in the QGIS console. Definitely very prototype stuff here so be warned...

temporary

@timlinux
timlinux / find_multipart.py
Last active August 13, 2023 13:19
A QGIS Python snippet to select multipart features in the active layer
# Find all multipart features in the active layer
l = iface.activeLayer()
iter = l.getFeatures()
geoms = []
for feature in iter:
geom = feature.geometry()
if geom.isMultipart():
l.select(feature.id())
geoms.append(geom)
@timlinux
timlinux / FedoraWorkstationSetupNotes.md
Last active June 13, 2023 11:44
Fedora Workstation Setup Notes

Fedora Workstation Installation Notes

These are my notes for setting up my production workstation with QGIS dev environment and various other niceties.

Mounting encrypted drives

I have three 2TB SSD drives in addition to the system drive which is 250GB.

To get them to mount you need to not include them in the original setup of the computer disk scheme. Then after first log in to the system do the following:

{
"version": 8,
"name": "testing",
"metadata": {"maputnik:renderer": "mbgljs"},
"sources": {
"MyCivitasStaging": {
"type": "vector",
"tiles": ["https://staging.mycivitas.ca/community-layer/{z}/{x}/{y}"],
"minZoom": 0,
"maxZoom": 14