Skip to content

Instantly share code, notes, and snippets.

View smellman's full-sized avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
@smellman
smellman / Makefile
Created March 1, 2020 09:58
docker-postgis #176
VERSIONS = $(foreach df,$(wildcard */Dockerfile),$(df:%/Dockerfile=%))
REPO_NAME ?= postgis
IMAGE_NAME ?= postgis
GIT=git
OFFIMG_LOCAL_CLONE=$(HOME)/official-images
OFFIMG_REPO_URL=https://github.com/docker-library/official-images.git
UNAME := $(shell uname)
build: $(VERSIONS)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smellman
smellman / import_osm.sh
Created February 11, 2020 03:52
OpenMapTiles: Import OSM without quickstart.sh
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
if [ $# -eq 0 ]; then
echo "you need to set version"
echo "example: $0 3.9"
exit 1
else
@smellman
smellman / invalid_fude.txt
Created January 1, 2020 01:12
筆ポリゴンでスペースが入って処理できないやつ一覧
Unable to open datasource `./26京都府2019/26201福知山市' with the following drivers.
Unable to open datasource `2019/26201福知山市2019_5.shp' with the following drivers.
Unable to open datasource `./26京都府2019/26214木津川市' with the following drivers.
Unable to open datasource `2019/26214木津川市2019_5.shp' with the following drivers.
Unable to open datasource `./26京都府2019/26344宇治田原町' with the following drivers.
Unable to open datasource `2019/26344宇治田原町2019_5.shp' with the following drivers.
Unable to open datasource `./26京都府2019/26407京丹波町' with the following drivers.
Unable to open datasource `2019/26407京丹波町2019_5.shp' with the following drivers.
{
"format": "pbf",
"name": "fude",
"id": "fude",
"bounds": [
122.937012,
24.026397,
145.810547,
45.521744
],
@smellman
smellman / style.json
Created December 14, 2019 05:43
GeoSaturday QGIS Vector tile plugin + OpenMapTiles demo files
{
"version": 8,
"name": "Bright",
"metadata": {
"mapbox:autocomposite": false,
"mapbox:groups": {
"1444849242106.713": {"collapsed": false, "name": "Places"},
"1444849334699.1902": {"collapsed": true, "name": "Bridges"},
"1444849345966.4436": {"collapsed": false, "name": "Roads"},
"1444849354174.1904": {"collapsed": true, "name": "Tunnels"},
@smellman
smellman / explain_fast.txt
Last active April 12, 2019 23:58
OpenMapTiles postserve research at 2019/04/13
Append (cost=4.11..275961.72 rows=16 width=32) (actual time=95.132..116.464 rows=16 loops=1)
-> Aggregate (cost=4.11..4.12 rows=1 width=32) (actual time=95.114..95.127 rows=1 loops=1)
-> Append (cost=0.00..3.95 rows=27 width=3447) (actual time=0.410..54.326 rows=27 loops=1)
-> Append (cost=0.00..3.54 rows=27 width=3447) (actual time=0.393..53.961 rows=27 loops=1)
-> Seq Scan on ne_110m_ocean (cost=0.00..1.03 rows=2 width=41832) (actual time=0.375..51.364 rows=2 loops=1)
Filter: ((geometry && '0103000000010000000500000093107C45F81B73C196107C45F81B73C193107C45F81B73C193107C45F81B734193107C45F81B734193107C45F81B734193107C45F81B734196107C45F81B73C193107C45F81B73C196107C45F81B73C1':
:geometry) AND (st_asmvtgeom(geometry, 'BOX(-20037508.3427892 -20037508.3427893,20037508.3427892 20037508.3427892)'::box2d, 4096, 4, true) IS NOT NULL))
-> Seq Scan on ne_110m_lakes (cost=0.00..2.38 rows=25 width=376) (actual time
@smellman
smellman / postgis_0_0_0_issue_check_git_bisect_log.txt
Last active March 30, 2019 00:47
git bisect log for postgis 0/0/0 issue
# bad: [640e0850d0d7dddeedd681cc02120a8a71b638f8] Tag for 2.4.0 release.
# good: [ff0a844e606622f45841fc25221bbaa136ed1001] Use SVG format for Travis badge
git bisect start '640e0850d0d7dddeedd681cc02120a8a71b638f8' 'ff0a844e606622f45841fc25221bbaa136ed1001'
# good: [eaa7695c5b564931605e2c09d8b9830c53071b25] #3829, Crash in LWGEOM2GEOS
git bisect good eaa7695c5b564931605e2c09d8b9830c53071b25
# good: [08e461795d306932b777a8b965a246ce83189d2d] update docs to reflect = operator changed in 2.4.0. correct the examples to exhibit new behavior. Put a note in ~= which means what = used to mean References #3844 for PostGIS 2.4.0
git bisect good 08e461795d306932b777a8b965a246ce83189d2d
# bad: [fe84d4c2856a9193fdb35ea963a3ada6afca02d4] Fixes from Andreas Schild via Transifex
git bisect bad fe84d4c2856a9193fdb35ea963a3ada6afca02d4
# bad: [7be3aeba4b7c731d9a57b73f244f9b10b174f5ab] typo corrections from Andreas Schild via transifex
@smellman
smellman / explain_fast.txt
Created March 22, 2019 08:55
OpenMapTiles postserve research at 2019/03/22.
Append (cost=4.08..275139.53 rows=16 width=32) (actual time=21.317..26.948 rows=16 loops=1)
-> Aggregate (cost=4.08..4.09 rows=1 width=32) (actual time=21.316..21.317 rows=1 loops=1)
-> Append (cost=0.00..3.95 rows=27 width=3447) (actual time=0.202..11.278 rows=27 loops=1)
-> Append (cost=0.00..3.54 rows=27 width=3447) (actual time=0.202..11.274 rows=27 loops=1)
-> Seq Scan on ne_110m_ocean (cost=0.00..1.03 rows=2 width=41832) (actual time=0.201..10.175 rows=2 loops=1)
Filter: ((geometry && '0103000000010000000500000093107C45F81B73C196107C45F81B73C193107C45F81B73C193107C45F81B734193107C45F81B734193107C45F81B734193107C45F81B734196107C45F81B73C193107C45F81B73C196107C45F81B73C1'::geometry) AND (st_asmvtgeom(geometry, 'BOX(-20037508.3427892 -20037508.3427893,20037508.3427892 20037508.3427892)'::box2d, 4096, 4, true) IS NOT NULL))
-> Seq Scan on ne_110m_lakes (cost=0.00..2.38 rows=25 width=376) (actual time=0
@smellman
smellman / config.toml
Created March 19, 2019 20:58
WIP: openmaptiles t-rex config
# t-rex configuration
[service.mvt]
viewer = true
[[datasource]]
dbconn = "postgresql://openmaptiles:openmaptiles@postgres/openmaptiles"
name = "dbconn"
default = true