More Related Content
Similar to Geohex at Off4g2009
Similar to Geohex at Off4g2009 (20)
More from Tadayasu Sasada
More from Tadayasu Sasada (6)
Geohex at Off4g2009
- 1. GeoHex
@sa2da
2009.12.21
#off4g #geohex
- 11. Easy to use distance
function getDistance(_x1,_y1, _x2,_y2)
{
_x2 = _x2 * Math.PI / 180.0;
_y2 = _y2 * Math.PI / 180.0;
_x1 = _x1 * Math.PI / 180.0;
_y1 = _y1 * Math.PI / 180.0;
var dx=_x2-_x1;
var dy=_y2-_y1;
var A = 6378137; // (6378137m)
A.x - B.x
var x = A * (dx) * Math.cos( _y1 );
var y = A * (dy);
var old_exp = exp;
dy=Math.log(Math.tan(Math.PI/4+_y2/2))-Math.log(Math.tan(Math.PI/4+_y1/2));
var rad=((dy>=0) ? 1:-1)*Math.acos(dx/Math.sqrt(dx*dx+dy*dy))*180.0/Math.PI;
var tmpdist = Math.round(Math.sqrt(x*x + y*y));
totaldist = totaldist + tmpdist;
distcnt();
}
- 12. Easy to use route
with 6 direction
35.661960,139.697900
132KpxU
35.660093,139.701741 2
.
. 3
.
. 2
. .
. .
20 × (n) byte 7 + (n) byte
- 15. How to use GeoHex?
Creative Commons License
GitHub
Perl
kokogiko
Ruby / GitHub
hal_sk
AS3
calcul_omikan
http://github.com/geohex/