Skip to content

Instantly share code, notes, and snippets.

View wipfli's full-sized avatar

Oliver Wipfli wipfli

View GitHub Profile
@wipfli
wipfli / source-coverage.csv
Created September 16, 2025 05:50
mapterhorn source coverage
x y z source maxzoom
22 53 6 glo30 12
22 52 6 glo30 12
23 53 6 glo30 12
17 8 5 glo30 12
17 9 5 glo30 12
16 8 5 glo30 12
17 11 5 glo30 12
17 10 5 glo30 12
67 41 7 glo30 12
@wipfli
wipfli / gist:3b5432406f0012c2d00c2349c3eecdf8
Created September 11, 2025 14:45
hdd performace seagate exos X24
https://www.digitec.ch/de/s1/product/seagate-exos-x24-24-tb-35-cmr-festplatte-39559469
Write one 80 GiB file (85135469091 bytes): 4min 36s -> 294 MiB / sec
Read one 80 GiB file (85135469091 bytes): 5min 31s -> 245 MiB / sec
import llm
prompt = f'''Extract an OpenStreetMap opening_hours string from the following website.
Your response must contain only the opening hours string.
Your response should contain temporary closures.
The corresponding OpenStreetMap entry has these tags:
access = yes
addr:city = Zürich
@wipfli
wipfli / measure.py
Created July 8, 2025 08:26
iconremap chaching
# File copied from https://github.com/MeteoSwiss/meteodata-lab
#
# Copyright (c) 2023 Federal Office of Meteorlogy and Climatology MeteoSwiss
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@wipfli
wipfli / extract.sh
Created June 4, 2025 16:41
pinmeto overture pmtiles
set -e
set -u
duckdb -c "
LOAD spatial;
SET s3_region='us-west-2';
COPY (
SELECT
@wipfli
wipfli / README.md
Last active April 7, 2025 06:59
country-zooms-tilezen.md

Converting country zooms from tilezen to protomaps resources/country-zooms.csv

Clone https://github.com/tilezen/vector-datasource/, go to spreadsheets/min_zooms

download place=country from overpass-turbo to the the wikidata ids of the countries and other properties, store in countries.geojson

save the following to country.py

# country.py
@wipfli
wipfli / logs.txt
Last active March 12, 2025 09:26
planetiler crashes
0:00:00 DEB - argument: config=null (path to config file)
0:00:00 WAR - [21:108] Unexpected token type: START_OBJECT
0:00:00 WAR - [24:109] Unexpected token type: START_OBJECT
0:00:00 WAR - [25:130] Unexpected token type: START_OBJECT
0:00:00 WAR - [38:127] Unexpected token type: START_OBJECT
0:00:00 WAR - [39:108] Unexpected token type: START_OBJECT
0:00:00 WAR - [41:131] Unexpected token type: START_OBJECT
0:00:00 WAR - [48:173] Unexpected token type: START_OBJECT
0:00:00 WAR - [53:114] Unexpected token type: START_OBJECT
0:00:00 WAR - [64:118] Unexpected token type: START_OBJECT
@wipfli
wipfli / README.md
Last active October 4, 2025 18:24
Planetiler performance tests

Some performance tests with my new computer. Running Planetiler Protomaps basemap on the OSM planet (79 GB).

Hardware:

Screenshot_20250118_222804

OS:

hophop:~$ uname -a
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src='https://unpkg.com/[email protected]/dist/maplibre-gl.js'></script>
<link href='https://unpkg.com/[email protected]/dist/maplibre-gl.css' rel='stylesheet' />
<link href="https://demotiles.maplibre.org/style.json" rel="preload" as="fetch" />
<link href="https://demotiles.maplibre.org/tiles/tiles.json" rel="preload" as="fetch" />
<link href="https://demotiles.maplibre.org/tiles/1/1/1.pbf" rel="preload" as="fetch" />