Skip to content

Instantly share code, notes, and snippets.

View handygeospatial's full-sized avatar

Hidenori FUJIMURA handygeospatial

View GitHub Profile
@handygeospatial
handygeospatial / direction_of_svg2.markdown
Last active December 27, 2015 23:49
SVG2 の方向性として「XML作法離れ」及び「HTML との融合」があると聞いていたところ、これを表現した文書を見つけたのでまとめてみる。

出典

http://dev.w3.org/SVG/proposals/improving-svg-dom/ でのプロポーザルについて、http://www.xanthir.com/b4RR0 で解説がされている。これを斜め読みして以下の「主なポイント」をまとめてみる。

主なポイント

名前空間の消滅

XML名前空間の存在を事実上消滅させる。具体的には、HTMLの名前空間でも名前空間なしでも動作するようにす。手続き論的にはXML名前空間の作法に従いつつも、XML名前空間を終わらせているように見える。(graceful に終わらせる、と言おうか。)

HTMLとカブるDOM API等を削除

タイトルにあるものの他、a, script 及び style が被っている割に機能が微妙に違うので統合するというように読める。SVG要素からid, xmlbase, className, style, xmllang と xmlspace を消去するように読める。

パス式の強化

SVGの伝家の宝刀、パス式の強化。circular/elliptical arcsをパス式で描けるようにするらしい。

@handygeospatial
handygeospatial / map.geojson
Created August 14, 2013 21:32
via:geojson.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
A WMTS enabled server application can serve map tiles of spatially referenced data using tile images with predefined context, extent, and resolution.
@handygeospatial
handygeospatial / file0.txt
Created May 6, 2015 20:57
Shapefile を tippecanoe でベクトルタイル変換して tessera 経由でブラウザ確認するまで ref: http://qiita.com/handygeospatial/items/eda4c6305d6d042c8178
$ ruby togeojson.rb | gzip -9 > some.geojson.gz
$ npm find tilelive
NAME DESCRIPTION
cdbtiles cdbtiles is a tilelive backend plug-in for CouchDB
mbtiles Utilities and tilelive integration for the MBTiles forma
mongotiles mongotiles is a tilelive backend plug-in for MongoDB Gri
tessera A tilelive-based tile server
tilelive API for various map tile backends
tilelive-blend A tilelive provider that blends.
tilelive-bridge Datasource => vector tiles bridge backend for tilelive
tilelive-cache A caching wrapper for tilelive.js
@handygeospatial
handygeospatial / keywords.txt
Created March 1, 2015 20:09
1月29日現在の地理院地図パートナーリストから手動で取り出したキーワード
ハザード
観光
空き家
地質
地盤
防災
データ生産
浸水想定
経路探索
配車
@handygeospatial
handygeospatial / file0.rb
Last active August 29, 2015 14:16
SizedQueue を使った無駄撃ちのない地理院タイルダウンローダ(Ruby) ref: http://qiita.com/handygeospatial/items/5baaf9d0ae1c817420bd
require 'open-uri'
require 'digest/md5'
require 'fileutils'
require 'zlib'
require 'thread'
Z_EXTENT = (18..18)
T = 'std'
N_THREADS = 8
Q_SIZE = 200
{"story": [
{
"type": "Feature",
"geometry" {
"type": "Point",
"coordinate" : [...]
},
"html": "...",
"viewport": ...
},
@handygeospatial
handygeospatial / file0.txt
Created January 14, 2015 20:56
GeoJSONタイルのフォーマットの違い(TileLayer.GeoJSON vs Tangram) ref: http://qiita.com/handygeospatial/items/cc0cf63b13e2857c56ee
/**
Mapzen/OSM.US-style GeoJSON vector tiles
@class GeoJSONTileSource
*/
export class GeoJSONTileSource extends NetworkTileSource {
constructor (source) {
super(source);
this.type = 'GeoJSONTileSource';
}
@handygeospatial
handygeospatial / file0.rb
Last active August 29, 2015 14:12
elevation_of を使って 3D GeoJSON を作成するスクリプト ref: http://qiita.com/handygeospatial/items/aa9175bd3014acc84209
require 'json'
require './elevation_of.rb'
data = JSON.parse(File.open('kyogatake.geojson').read)
a = data['features'][0]['geometry']['coordinates']
a.each_index {|i|
a[i] << elevation_of(a[i][0], a[i][1])
}