Skip to content

Instantly share code, notes, and snippets.

View pnorman's full-sized avatar

Paul Norman pnorman

View GitHub Profile
e (external) 11291.733
m (main) 11256.321
x (extended) 11321.855
@pnorman
pnorman / LICENCE
Created June 6, 2018 05:55
open mouth emoji
This SVG is licensed CC0 by Paul Norman
<!DOCTYPE html>
<html style="height:100%;margin:0;padding:0;">
<title>Leaflet page with OSM render server selection</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/[email protected]/leaflet-hash.js"></script>
<style type="text/css">
.leaflet-tile-container { pointer-events: auto; }
</style>
@pnorman
pnorman / names.csv
Last active March 25, 2018 09:05
name data
2808870 name:en
1035545 name:ru
559728 name:ja
488167 name:de
464426 name:fr
410579 name:ar
352527 name:zh
328441 name:uk
277724 name:fi
190678 name:es
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We're looking at releasing osm2pgsql 0.94.0 soon and could use testing
of the 0.94.0-RC1 version. Testing from packagers is appreciated,
particularly if you are doing something different with libosmium.
Major changes
- Store unprojected coordinates in slim tables and use osmium dense file
array for flat nodes
This fixes a number of projection-related issues
@pnorman
pnorman / log.txt
Created March 25, 2017 08:23
osmium error with osm2pgsql changes
(gdb) run -d osm2pgsql_test --number-processes 1 --output multi --style cleartables.json --flat-nodes nodes.bin ~/osm/osm2pgsql/tests/liechtenstein-2013-08-03.osm.pbf
Starting program: /home/pnorman/osm/osm2pgsql/build/osm2pgsql -d osm2pgsql_test --number-processes 1 --output multi --style cleartables.json --flat-nodes nodes.bin ~/osm/osm2pgsql/te
sts/liechtenstein-2013-08-03.osm.pbf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
osm2pgsql version 0.93.0-dev (64 bit id space)
Using lua based tag processing pipeline with script admin.lua
Using lua based tag processing pipeline with script admin.lua
Using lua based tag processing pipeline with script place.lua
#!/usr/bin/env bash
# This script will
# 1. Download OSM data and load it into a DB
# 2. Update that DB
# 3. Keep a local copy of the planet up to date
# Requirements
# - osmium-tool
# - osmosis
@pnorman
pnorman / 4krw.txt
Last active January 30, 2017 10:35
[global]
name=4k random rw 4ios in 32 queues
filename=fio.bin
ioengine=libaio
direct=1
bs=4k
rw=randrw
iodepth=32
numjobs=8
buffered=0
@pnorman
pnorman / changesetmd-partition.sql
Last active January 6, 2017 06:49
Partion ChangesetMD tables
UPDATE osm_changeset_state SET update_in_progress = 1; -- lock out ChangesetMD from updating
ALTER TABLE osm_changeset RENAME TO old_osm_changeset;
CREATE TABLE osm_changeset (LIKE old_osm_changeset INCLUDING CONSTRAINTS);
CREATE TABLE osm_changeset_0m AS SELECT * FROM old_osm_changeset WHERE id >= 0 AND id < 10000000;
ALTER TABLE osm_changeset_0m ADD CHECK (id >= 0 AND id < 10000000);
CREATE UNIQUE INDEX osm_changeset_0m_pkey ON osm_changeset_0m (id) WITH (fillfactor = 100);
ALTER TABLE osm_changeset_0m ADD PRIMARY KEY USING INDEX osm_changeset_0m_pkey;
CREATE INDEX ON osm_changeset_0m (user_id) WITH (fillfactor = 100);