Skip to content

kobaken/webmerc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

インストール

npm install webmerc -g

使い方

緯度経度からピクセルを求める

% webmerc --c2p 35.7,139.7,15
{ x: 7449549.938230911, y: 3302710.99871282 }

ピクセルから緯度経度を求める

% webmerc --p2c 7449549.938230911,3302710.99871282,15
35.7,139.7

緯度経度からメートルを求める

% webmerc --c2m 35.7,139.7
{ x: 15551332.863820316, y: 4259419.96554792 }

メートルから緯度経度を求める

% webmerc --m2c 15551332.863820316,4259419.96554792
35.7,139.7

タイルインデックスから中心の緯度経度を求める

% webmerc --t2c 15/29099/12901
35.697455,139.696655

緯度経度からタイルインデックスを求める

% webmerc --tileindex 35.7,139.7,15
15/29099/12901 205,54

% webmerc --tileindex 35.7,139.7
0/0/0 227,100
1/1/0 198,201
2/3/1 141,147
3/7/3 26,38
4/14/6 53,76
5/28/12 106,153
6/56/25 213,50
7/113/50 171,101
8/227/100 87,202
9/454/201 175,148
10/909/403 94,41
11/1818/806 188,83
12/3637/1612 121,166
13/7274/3225 243,77
14/14549/6450 230,155
15/29099/12901 205,54
16/58199/25802 155,109
17/116399/51604 55,219
18/232798/103209 111,183
19/465596/206419 223,111
20/931193/412838 190,223
21/1862387/825677 124,191
22/3724774/1651355 248,127

緯度経度とピクセル値から移動後の緯度経度を求める

% webmerc --translate 35.7,139.7,15.5,100,50
35.698767,139.703034

npmモジュール作成手順

事前準備

  1. npmにsignupして開発者登録しておく
  2. npm adduserしておく

手順

  1. mkdir webmerc

  2. cd webmerc

  3. npm init

    package.jsonが作成される

  4. npm install

  5. npm publish

    これでnpmに上がる。更新も同じ

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%