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 / style.json
Created July 17, 2017 05:49 — forked from anonymous/style.json
Dark Matter
{
"version": 8,
"name": "Dark Matter",
"metadata": {
"mapbox:autocomposite": false,
"mapbox:type": "template",
"mapbox:groups": {
"b6371a3f2f5a9932464fa3867530a2e5": {
"name": "Transportation",
"collapsed": false
@smellman
smellman / docker-compose.yml
Created July 7, 2017 11:41
tileserver-gl + varnish + docker-compose
version: '2'
services:
varnish:
image: eeacms/varnish
ports:
- "6081:6081"
depends_on:
- raster-tileserver
environment:
BACKENDS: "raster-tileserver"
@smellman
smellman / get_dem_from_gsimap.html
Created June 9, 2017 05:29
Get dem from GSI dem tile example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Get dem from GSI dem tile</title>
<!-- leaflet.js -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css"
integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"
@smellman
smellman / overpass.geojson
Created March 4, 2017 06:42 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smellman
smellman / overpass.geojson
Created March 3, 2017 00:19 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smellman
smellman / osm-liberty.json
Created February 3, 2017 08:19
osm-liberty + migmix font
{
"version": 8,
"name": "OSM Liberty",
"metadata": {
"mapbox:type": "template"
},
"sources": {
"natural_earth_shaded_relief": {
"maxzoom": 6,
"tileSize": 256,
@smellman
smellman / index.html
Created December 30, 2016 15:30
wellknown.js demo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>GSI Tiles on Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.2/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.2/dist/leaflet.js"></script>
<script src="https://cdn.rawgit.com/mapbox/wellknown/master/wellknown.js"></script>
<style>
@smellman
smellman / poly2bbox.py
Created December 3, 2016 09:55
Get BBOX value from poly file
import re
def parse(input_file):
f = open(input_file)
lines = f.readlines()
f.close()
longitudes = []
latitudes = []
for line in lines:
r = re.match("\s+([\w\.\+]+)\s+([\w\.\+]+)", line)
{
"version": 8,
"name": "GSI ORT Raster Tiles",
"glyphs": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/fonts/{fontstack}/{range}.pbf",
"sprite": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/maki-sprites/sprite",
"sources": {
"gsi-ort": {
"type": "raster",
"tiles": [
"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"
@smellman
smellman / qgis-configdialog.py.diff
Created November 2, 2016 13:33
QGIS ConfigDialog error patch
--- tmp/ConfigDialog.py 2016-11-02 21:53:40.000000000 +0900
+++ /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/gui/ConfigDialog.py 2016-11-02 22:15:03.000000000 +0900
@@ -248,8 +248,9 @@
try:
setting.setValue(unicode(self.items[setting].text()))
except ValueError as e:
+ msg = 'Wrong value for parameter "%s"\n\n%s' % (setting.description, unicode(e))
QMessageBox.warning(self, self.tr('Wrong value'),
- self.tr('Wrong value for parameter "%s":\n\n%s' % (setting.description, unicode(e))))
+ msg)